Butterfly icon indicating copy to clipboard operation
Butterfly copied to clipboard

[Enhancement]: Markdown changes only update once the text area is closed

Open MrGumpIT opened this issue 1 year ago • 6 comments
trafficstars

Which feature is your request related to?

markdown

Describe your request for enhancements!

I think that when I write in markdown if for example I use an H1 this should be immediately shown as such, and not after the insertion is finished and the text area is closed

Additional context

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

MrGumpIT avatar Feb 12 '24 02:02 MrGumpIT

That's a good idea. But I would show the # in the preview to have it easy to remove it again. The app uses https://pub.dev/documentation/markdown/latest/ for markdown rendering. I'm currently not sure how I configure it to keep the #, *, ...

CodeDoctorDE avatar Feb 12 '24 07:02 CodeDoctorDE

I thought you could render the item once you hit enter. In which files is markdown handled?

MrGumpIT avatar Mar 19 '24 20:03 MrGumpIT

In edit mode the markdown won't be rendered. It's inside app/lib/renderers/elements/markdown.dart

CodeDoctorDE avatar Mar 19 '24 20:03 CodeDoctorDE

I managed to get the markdown in edit mode, however I can't get an acknowledgment of when the enter key is pressed. I think an alternative would be to have a button to choose to enable live markdown editor. Unless you have some idea how to recognize a submit button or a line break

MrGumpIT avatar Mar 20 '24 17:03 MrGumpIT

What do you mean with that? look at the action in the label handler. But i don't see why you need to check that. New line isn't submitting, it's just, making a new line.

CodeDoctorDE avatar Mar 20 '24 17:03 CodeDoctorDE

I mean that now when you write you see the text formatted in markdown. But I would have liked it to happen when I pressed the enter key. But I don't know how to do it.

MrGumpIT avatar Mar 20 '24 17:03 MrGumpIT