cycleccc / wangEditor-next

wangEditor-next —— Open-source web rich text editor, based on slate.js. wangEditor-next —— 开源 Web 富文本编辑器,基于 slate.js。
https://cycleccc.github.io/docs/
MIT License
30 stars 4 forks source link

Bug : 在 Android 上输入英文时,自动更正不会替换输入的内容 When typing English on android, autocorrect does not replace what was written #12

Open Tanza3D opened 1 month ago

Tanza3D commented 1 month ago

我正在使用谷歌翻译,如果我写的内容有任何问题,我很抱歉

bug 描述

On an Android device using Gboard (i haven't tested others), when you type a word in English, if you misspell it, it will replace it with the right word when you press the space bar. With wangEditor, it does not replace the word, but it instead appends it, leading to it being very hard to type english on this editor.

在使用 Gboard 的 Android 设备上(我还没有测试过其他键盘),当你用英文输入一个单词时,如果拼写错误,按下空格键后它会用正确的单词替换它。使用 wangEditor,它不会替换该单词,而是将其附加到末尾,这使得在这个编辑器上输入英文非常困难。

e.g. I will type "goi" (when i mean "going") and it will replace it with "going" in normal apps. When using wangEditor, it instead replaces it with "goigoing" (appending it on the end) When using Chrome, it actually ends up as "going goi", seemingly adding it to the start instead.

例如,我输入“goi”(我的意思是“going”),在普通应用中它会将其替换为“going”。 使用 wangEditor 时,它会将其替换为“goigoing”(将其附加在末尾) 使用 Chrome 时,它​​实际上会变成“going goi”,似乎将其添加到开头。

This is especially an issue when typing something like "im" which should be spelt as "I'm" so the keyboard auto corrects this, and in wangEditor it ends up reading "iI'm" 在输入诸如“im”之类的单词时,这个问题尤其严重,因为单词应该拼写为“I'm”,因此键盘会自动更正,而在 wangEditor 中,它最终会显示为“iI'm”

你预期的样子是?

It should instead replace the misspelt word with the correct spelling, as happens in other software and input fields 它应该用正确的拼写替换拼写错误的单词,就像在其他软件和输入字段中发生的情况一样

系统和浏览器及版本号

Latest wangEditor version (https://unpkg.com/@wangeditor-next/editor@5.2.2/dist/index.js) 最新的 wangEditor 版本 (https://unpkg.com/@wangeditor-next/editor@5.2.2/dist/index.js)

demo 能否复现该 bug ?

在线 demo

不适用

最小成本的复现步骤

Video showing issue/视频显示该问题: https://drive.google.com/file/d/1NB4mSmCfjLiSyQf3m-UMvXzPfBaj5Cii/view?usp=sharing

cycleccc commented 1 month ago

Thank you for your feedback. Since wangEditor is developed based on Slate.js, the issue with the input method cursor is an existing bug accumulated in Slate. Previously, wangEditor used some hack methods to solve some bugs caused by the input method, but they still didn't completely eliminate the issue. The latest version of Slate seems to have overcome this problem. However, since the original author hasn't updated the Slate version for several years, and many changes have occurred in the API, this may take some time. 感谢你的反馈,由于wangEditor 是 基于 slate.js 开发的,输入法光标问题是 slate 累积已经的 bug,在这之前,wangEditor 使用了一些 hack 手段去解决输入法带来的部分 bug ,但依旧没有根除,最新的 slate 似乎已经克服了这个问题,由于原作者已经几年没有更新 slate 版本了,api 发生了不少变化,这可能需要花些时间。

cycleccc commented 1 month ago

8 Issue 8 is a similar bug.

Tanza3D commented 1 month ago

Thank you for the quick response. I'll switch my project to another library for now and keep an eye on progress here. This editor truly is the best one I've found so far, so I'll be switching back as soon as things are fixed 感谢您的快速回复。我现在将我的项目切换到另一个库,并关注这里的进展。这个编辑器确实是我迄今为止发现的最好的编辑器,所以一旦问题解决,我就会切换回来

Thank you for your hard work on this editor library!

cycleccc commented 1 month ago

Ok, no matter what, thank you for your reply. I will notify you when the bug is fixed. ok,无论怎样,感谢你的回复,当 bug 修复时,我会通知你的。😄