visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
290 stars 47 forks source link

DocumentController - Using the update() method will inevitably add a new breakline at the end of the document #225

Closed adrian-moisa closed 1 year ago

adrian-moisa commented 1 year ago

(!) Calling update() will trigger two operations: clear() and compose(). clear() will use replace() to cleanup the entire document until we are left with [{"insert":"\n"}]. compose() will then use the new delta to append it to the document. documentController.compose() will trigger an insert on the rootNode (nodes list). Reminder: clear() has updated both the delta and rootNode to contain an empty line with a simple break line inside. This means we are adding empty rootNode "\n" + new data: "abc\n" and we will get "abc\n\n".

https://github.com/visual-space/visual-editor/assets/11160141/37b5020e-2fb6-400f-bc44-dd8fca8d53b9

adrian-moisa commented 1 year ago

In case anyone is reading this ticket searching for updates. Yes, we are still alive. VE is still a project that we take care of. We've been slow to release any major updates because we are 110% focused on finishing our own startup projects and getting it live. Once it's live VE becomes major priority. Around end of September you will start seeing tickets moving.