opentiny / fluent-editor

Fluent Editor is a rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It is powerful and out-of-the-box. Fluent Editor 是一个基于 Quill 2.0 的富文本编辑器,在 Quill 基础上扩展了丰富的模块和格式,功能强大、开箱即用。
https://opentiny.github.io/fluent-editor/
MIT License
148 stars 17 forks source link

🐛 [Bug]: setContents回填 delta 数据到编辑器中会导致编辑器选区异常报错。 #129

Closed 983033995 closed 4 days ago

983033995 commented 4 days ago

Version

3.22.0

Link to minimal reproduction

https://github.com/983033995/fluent-editor-demo/tree/main

Step to reproduce

props.content.value = [ { "insert": "数轴上,其中O为原点,如图,OABC四点在点所表示的数为m,则B点且AC=2,OA=20B,若C所表示的数正确的是:" }, { "insert": { "mathlive": { "mode": "dialog", "value": "\frac{\left(\int_0^{\infty}\!56\,\mathrm{d}x\right)}{\sqrt{63}}+\cos\left(58\right)=?" } } }, { "insert": "\n" } ]

// 以下是quilljs示例的数据 props.content.value =[ { insert: 'Hello ' }, { insert: 'World!', attributes: { bold: true } }, { insert: '\n' }, ]

image

What is expected

No response

What is actually happening

No response

What is your project name

教育管理系统

Any additional comments (optional)

No response

983033995 commented 4 days ago

没事了,找到问题了,初始化的编辑器实列不能使用ref来赋值,要使用普通变量