asjqkkkk / markdown_widget

šŸ“–Rendering markdown by flutterļ¼Welcome for pr and issue.
MIT License
312 stars 90 forks source link

View and Edit at the Same Time #145

Open thomastthai opened 8 months ago

thomastthai commented 8 months ago

Currently, there is either edit mode or view mode. That's typical for how markdown editors and viewers work. How would we combine them in a hybrid edit mode?

In hybrid-edit mode, the entire document would be in view mode with the exception of the block or paragraph the cursor is onā€”that would be in hybrid-edit mode.

Have a setting to configure for edit or hybrid-edit mode.

There would still be a view/edit button.

asjqkkkk commented 8 months ago

Hi @thomastthai, this sounds like a Markdown rich text editor, which is quite complex. Currently, there is no available spare time to work on this, and there isn't a good idea on how to implement it at the moment. Perhaps it could be considered in the future, but before that, there needs to be a clear plan on how to approach the implementation before starting the work.

thomastthai commented 8 months ago

About a year ago, I looked at many Markdown editors for Flutter. I couldn't find any with that capability. There were a few using Javascript though.

asjqkkkk commented 8 months ago

Hi @thomastthai , you can have a look with https://pub.dev/packages/flutter_quill and https://github.com/AppFlowy-IO/appflowy-editor At the same time, I am currently attempting to implement a rich text editor. I have completed some preliminary validation work, and if everything goes smoothly, I will proceed to develop a fully functional version. However, this may take a considerable amount of time.

thomastthai commented 7 months ago

Hi @asjqkkkk! I have checked out flutter_quill. Super Editor is the only Flutter package that I found that can handle custom block types for that hybrid view/edit mode simultaneously. Unlike what the name says, it's actually a toolkit that can be used to build a rich-text editor.

They developed their own custom text widgets to handle various cases. Their WYSIWYG document serializes to Markdown. That can be challenging for users who want to keep their original version of their Markdown document.

Perhaps that package could be building blocks for your own rich-text editor and save you development time.