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 headings length limit #199

Closed sebastian0107 closed 1 year ago

sebastian0107 commented 1 year ago

We need a demo page to show how we can handle the headings that exceeds a characters limit

sebastian0107 commented 1 year ago

Firstly, we extracted all headings from the document. For every heading, we check its length. If its length is greater than our limit we will create a new counter which will be displayed next to the heading in the document. Furthermore, the extra characters will be highlighted so it will be easier for users to adapt their heading. To achieve the sticky counter effect we put the text and the counters in a stack. Every time the document changes or the page is scrolled we update the position of the counters.

sebastian0107 commented 1 year ago

https://user-images.githubusercontent.com/105392078/209951229-020f548e-6e4f-4991-a5c9-9d91c639a8c9.mp4