opentiny/fluent-editor

🐛 [Bug]: 格式丢失

Closed this issue · 6 comments

Version

3.19.1

Link to minimal reproduction

Step to reproduce

从这里复制 https://blog.csdn.net/a1150499208/article/details/131437199

image

然后粘贴到富文本 code 里面,* 直接消失了

What is expected

image

What is actually happening

image

当我修复之后,点击enter,同样触发 * 消失了。

当我粘贴 sh docker_insert_mysql8.0.20.sh 点击enter,同样触发 _ 消失了
image

What is your project name

Any additional comments (optional)

No response

我从官方示例中进行粘贴并没有出现这样的问题,最好能提供一个复现链接,比如使用https://stackblitz.com/

找到原因了,应该是插件造成的
https://opentiny.github.io/fluent-editor/docs/markdown
在这里测试就可以重现了

找到原因了,应该是插件造成的 https://opentiny.github.io/fluent-editor/docs/markdown 在这里测试就可以重现了

不是在代码块中的问题吗,这个页面的编辑器没有代码块功能啊,仅粘贴文字是没有丢失的

kagol commented

@zttAsoiaf @zzxming Markdown那个demo引入了一个Quill模块:grant all PRIVILEGES on *.* to root@'%' WITH GRANT OPTION; ,因此文本中含有Markdown格式,按Enter会自动转换。

比如:

grant all PRIVILEGES on *.* to root@'%' WITH GRANT OPTION;

粘贴到:https://opentiny.github.io/fluent-editor/docs/markdown
这个demo中,光标放在行尾,按Enter,会自动转换成:

grant all PRIVILEGES on . to root@'%' WITH GRANT OPTION;

image

在其他没有引入Markdown模块的demo中不会自动转换,这不是问题,是正常现象。

kagol commented

#当我粘贴 sh docker_insert_mysql8.0.20.sh 点击enter,同样触发 _ 消失了

这个也是一样的道理,_insert_ 这个也是 Markdown 的斜体。

收到。这么看的话,markdown还是不行,用起来还是麻烦些。hhh