How can I customize the toPlainText() method? #1665
Closed
maelchiotti
started this conversation in
General
Replies: 1 comment
-
You can create your own toPlainText, get the delta, and convert it to text to fit your needs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am only using flutter-quill to allow the user to add checklists in the text field. I would like to customize the value of the
toPlainText()
method to insert a ✅ or a ⬜ in front of each lines if it is a checklist (and depending on its checked state).So, this:
![image](https://private-user-images.githubusercontent.com/44336112/295064476-58079a1a-a6b7-4b25-936a-d00d6807a065.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjY4OTMsIm5iZiI6MTczODgyNjU5MywicGF0aCI6Ii80NDMzNjExMi8yOTUwNjQ0NzYtNTgwNzlhMWEtYTZiNy00YjI1LTkzNmEtZDAwZDY4MDdhMDY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA3MjMxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc1NjZlMjdjNWUwMGQ2YmEwMDhmYjhmOTkzODhmMTQxMzRiZTlmMTY5MjhlZDE0MTNhNDJlNmEwYzczYTEzMmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.y-5yLZ1NAv19xHC_zr9stLHrYgK_ga32NLh3md4Q1Tg)
Would return this:
Instead of just the current return value:
Beta Was this translation helpful? Give feedback.
All reactions