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

修几个问题 #115

Open
wants to merge 1 commit into
base: poi-5
Choose a base branch
from
Open

修几个问题 #115

wants to merge 1 commit into from

Conversation

Cjsah
Copy link

@Cjsah Cjsah commented Jul 15, 2024

  1. 判断表格前段落删除时, 判断只删除最后一个换行, 而不是判断整个段落
  2. 如果在tr内且td外有内容, 渲染此内容导致cursor改变, 下一个tr/td无法获取table导致的IllegalStateException: No table in stack, 我直接屏蔽掉了这个位置的渲染
  3. 图片渲染的几个方法改成了protected, 方便直接继承使用

@draco1023
Copy link
Owner

十分感谢对本项目贡献代码。要说明的是本项目并不是为了兼容各种各样的html,尤其是各种纯文本节点游离的情况。我很好奇在什么情况下会在tr之间插入文本,表格前面的文本用p标签或者div包裹起来就不需要br,br是不会被浏览器忽略的,但是空p、div等标签是被忽略的。

@Cjsah
Copy link
Author

Cjsah commented Jul 16, 2024

因为是把其他人的富文本, 插入到表格里, 所以没法保证表格前的内容被div包起来, 需求还真就是各种各样的html.....
tr中的文本, 主要就是<tr><td></td>&nbsp;</tr>
空p、div等标签在尝试删除的时候会判断成空的段落, 然后正常删除 的吧?

@draco1023
Copy link
Owner

如果真要考虑各种位置会出现的游离文本节点,那么你修改的代码也是片面的(不能只考虑tr节点),只能解决你当下遇到的问题,并不具备通用性

@Cjsah
Copy link
Author

Cjsah commented Jul 17, 2024

确实

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants