Can super_editor be used to let users add highlights and notes to text? #2775
Unanswered
jcpsantiago
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @jcpsantiago are you primarily struggling with the initialization of a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
👋 hello! I'm new to flutter (via ClojureDart) and I'm feeling overwhelmed with the super_editor package, so I'm looking for help.
I wrote a book reader app (knowuro.com). Our books are written in Markdown and currently we render them with
flutter_markdown_plus
after splitting the Markdown document by header (A "block" looks like this# foo\n\nThis is the paragraph.
) and each widget's key is equal to the hash of the content — I found this to be easiest way to implement search and cross-references across books so that when a user clicks a search result or cross-reference link they jump to the block.Now, I want to let the users select some text and then either add a highlight or add a note. Outside the note, which should be a simple text input, I want text to always be read-only.
So far I've been playing with:
deserializeMarkdownToDocument
to go from (a single) Markdown document to aMutableDocument
(is mutable what I want?)createDefaultDocumentEditor
to create an editorSuperReader
The above renders the document 👍
Now I'm not sure what would be the best way forward to implement the highlighting and the "jump to widget" functionality I mention above.
In general any pointers are appreciated :) this package is quite large and I've been reading the source code for a few days but I haven't wrapped my head around it yet.
Beta Was this translation helpful? Give feedback.
All reactions