visual-space / visual-editor

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

Demos - Demo page for adding new elements in the document #195

Closed sebastian0107 closed 1 year ago

sebastian0107 commented 1 year ago

We need a demo page to demonstrate how to add elements to the document (ex. how to make a button that insert a new H1 line)

adrian-moisa commented 1 year ago

We have added a demo showcasing how to programatically add elements in the page.

https://user-images.githubusercontent.com/11160141/208688948-675808af-deb1-4b97-a514-59be021911d3.mov

sebastian0107 commented 1 year ago

We choose to add this page to show all clients how we can insert new elements at the end of the delta document by using only existing methods from the controller. Because there is no insert method available, this operation can be achieved by using a replacement (replaceText() )for the last element of the document.