visual-space / visual-editor

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

How can we make keep checklist style when double enter? #201

Closed sonysm closed 1 year ago

sonysm commented 1 year ago

How can we make keep checklist style when double enter?

Like google keep checklist Todo list

adrian-moisa commented 1 year ago

There is a set of heuristics rules in the editor. They act as middleware between the code that registers the new input and the code rendering the document.

image

There are 3 types of rules: insert, delete and retain. In the insert category there is the AutoExitBlockRule

image

Right now there is no option to override internal rules. But we could easily extend the config object with a dictionary used to disable rules. If you are interested to implement this feature I can explain on discord how it can be done. Right now I'm focused on other goals so I can't quickly implement it myself. I'd appreciate some extra hands on deck.

image
adrian-moisa commented 1 year ago

No follow up so far, closing