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

表格前的字符无法被修改 #5352

Closed
fanganpai opened this issue Feb 11, 2024 · 2 comments · Fixed by #5365
Closed

表格前的字符无法被修改 #5352

fanganpai opened this issue Feb 11, 2024 · 2 comments · Fixed by #5365
Assignees
Labels
area/editor Issues or PRs related to the Editor kind/bug Categorizes issue or PR as related to a bug.

Comments

@fanganpai
Copy link

系统信息

使用的哪种方式运行?

Docker

在线站点地址

https://www.fang-anpai.cn/

发生了什么?

我正尝试在默认编辑器中插入表格,并为表格中的文本设置特殊字体:
Uploading image.png…
之后,我发现只要一段文本出现在表格之前,就无法进行有效的编辑:
当我输入数字或字母,一切正常
当我使用输入法输入单个汉字,似乎也正常
当我使用输入法输入一个词组,我会进入“虚空状态”,该状态下我的任何操作都不会被记录,直到我点击保存或试图ctrl+a全选文章内容或点击任意非编辑器区域后退出。退出“虚空状态”后,输入框中只会留下输入法对应的字符(我使用自然码双拼输入法,当我试图输入“输入词组”后,最终会留下“uurucizu”),并且除了进入该状态时的那个词以外其余一切操作都会凭空消失。

相关日志输出

No response

附加信息

image
image

@ruibaby
Copy link
Member

ruibaby commented Feb 18, 2024

/kind bug
/area editor

cc @LIlGG

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/editor Issues or PRs related to the Editor labels Feb 18, 2024
@LIlGG
Copy link
Member

LIlGG commented Feb 18, 2024

/assign

f2c-ci-robot bot pushed a commit that referenced this issue Feb 21, 2024
… table (#5365)

#### What type of PR is this?

/kind bug
/area editor
/area console

#### What this PR does / why we need it:

在 #5191 中对表格新增了如果可以左右滚动时,则显示阴影的特性。而根据 `prosemirror` 的数据流处理策略,在 `decorations` 中,state 是 new EditorState,但通过 `this.editor.view` 获取到的 view 为 old EditorView,进而导致使用了最新的坐标,并且使用其坐标通过旧版本的 view 中获取 DOM 而产生的错误。

本 PR 使用 `NodeView` 而不是 `decorations` 来重新处理表格阴影。

#### How to test it?

在默认富文本编辑器中新建一个表格。在表格前使用拼音输入文本,查看此文本能否被输入。
同时查看表格阴影是否存在

#### Which issue(s) this PR fixes:

Fixes #5352

#### Does this PR introduce a user-facing change?
```release-note
解决默认富文本编辑器表格前字符无法被编辑的问题。
```
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 kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants