Hufe921 / canvas-editor

rich text editor by canvas/svg
https://hufe.club/canvas-editor-docs
MIT License
3.43k stars 498 forks source link

在标题行使用 executeInsertElementList 插入换行符,新产生的行会继承标题的格式 #669

Closed junestars closed 1 month ago

junestars commented 2 months ago

version

0.9.84

Link to minimal reproduction

https://hufe.club/canvas-editor/

Steps to reproduce

1、手动输入一行文本,并设置成一级标题 2、调用 executeInsertElementList([{value: '\n'}]) 换行

What is expected?

新产生的行应该移除标题格式,就像手动输入换行一样

What is actually happening?

新产生的行会保持标题格式,如下图 image

System Info

No response

Any additional comments?

No response