noties / Markwon

Android markdown library (no WebView)
https://noties.io/Markwon/
Apache License 2.0
2.74k stars 309 forks source link

Saving markdown after mutating task list #369

Open damionx7 opened 3 years ago

damionx7 commented 3 years ago

How can we save the markdown file after mutating task list using this sample code

noties commented 2 years ago

Hello @damionx7 ,

markdown is parsed one-way, so after it is parsed the input is not longer referenced. So there is no way to rebuild raw markdown from the data displayed in a TextView. You could maintain own datastore for tasks and identify them by raw text. But this would mean that markdown is dynamically generated from this datastore, which might not be optimal

KavenSu commented 1 year ago

@noties Hi !Do you mean,I can not parse EditText.getText()to Markdown-Format String?The text style in EditText is formated by some Spanned.