Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

默认编辑器编辑表格异常 #7205

Open
4 tasks done
Asteri5m opened this issue Jan 16, 2025 · 2 comments
Open
4 tasks done

默认编辑器编辑表格异常 #7205

Asteri5m opened this issue Jan 16, 2025 · 2 comments
Labels
area/editor Issues or PRs related to the Editor priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@Asteri5m
Copy link

前置条件

  • 已经在 issues 列表中搜索了相关问题。
  • 这是 Halo 项目本身存在的问题,如果是非项目本身的问题(如:安装部署问题),建议在 Discussions 提交。
  • 已经尝试过停用所有的插件,排除是插件导致的问题。
  • 如果是插件和主题的问题,请在对应的插件和主题仓库提交。

系统信息

「以上为构建的最新版本的测试环境,通过备份功能导入了数据作为测试」

使用的哪种方式运行?

Docker Compose

发生了什么?

在编辑器中编辑表格时,发现编辑表格内容内容时,无法设置表头。而且每一个还数据还会靠上……明显行高也是有点问题。
就像这样:

Image
查看元素发现缺少 thead
Image

我使用markdown写的表格则可以被正常渲染

Image

复现步骤

  1. 进入后台管理
  2. 新建文章
  3. 创建表格
  4. 填入随机内容
  5. 设置显示表头
  6. 保存文章
  7. 回到网站首页浏览文章

相关日志输出

附加信息

我的正式环境:

@mjsoftking
Copy link

此为主题问题,应该是halo修改过表格渲染的html表头部分,主题需要适配调整

@ruibaby
Copy link
Member

ruibaby commented Jan 20, 2025

目前编辑器的表格没有使用 thead 作为表头设置,而是单纯的 th,可参考:https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/th

而你使用的主题针对 th 的样式限制在了 thead,所以造成差异:

Image

@ruibaby ruibaby added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. area/editor Issues or PRs related to the Editor labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor Issues or PRs related to the Editor priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

3 participants