Markdown is a commonly used text-based format with simple(ish) direct formatting and a few structural elements (e.g. tables, block-quotes, code blocks). It is relatively popular, especially on web-based platforms (e.g. discourse installation, GitHub & GitLab). See: https://en.wikipedia.org/wiki/Markdown It would be useful if we could take a Writer document, and export it into a Markdown document. Notes: * There's a similar request regarding Calc: bug 94978. * Standardization for MarkDown is a bit problematic, with some fracturing regarding what constitutes the standard. https://commonmark.org may be relevant, but isn't the only option.
Import and Export filters are good, less controversial first steps in Markdown support. But as you said, the challenge is picking a flavour. Exporting to .md would simplify drastically the document to whatever the flavour allows. (In reply to Eyal Rozenberg from comment #0) > * There's a similar request regarding Calc: bug 94978. (I consider "Save As" to be very different, and a lot more difficult to implement, as it would imply that LO supports _editing_ markdown files. And for that, we'd need to accommodate markup editing + rendered view somehow (.e.g by repurposing the Web View), possibly with a stripped down UI that only offers what the format supports.) In any case, +1 for me. Design/UX team?
(In reply to Stéphane Guillou (stragu) from comment #1) > (I consider "Save As" to be very different, and a lot more difficult to > implement, as it would imply that LO supports _editing_ markdown files. The opening comment of the other bug says "One way I could imagine such a support is by export tables created in Calc to Markdown syntax." Also, I'm not sure how exactly you're making that distinction. If you can import a file format and export to it, then your app is an editor of that format. Perhaps not a great editor, nor an editor with "idempotence" over import-then-export, but an editor nonetheless. ... but maybe I'm misunderstanding? Also note I am not asking for Markdown _import_ support, at least not with this bug.
(In reply to Stéphane Guillou (stragu) from comment #1) > Import and Export filters are good, less controversial first steps in > Markdown support. But as you said, the challenge is picking a flavour. Right. And I know I said CommonMark, but then - Tables are important :-)
> Markdown support. But as you said, the challenge is picking a flavour Would propose Markdown-it due to being 100% compliant with CommonMark, secure by Google, and extensible with plugins https://github.com/markdown-it/markdown-it Python port: https://markdown-it-py.readthedocs.io/en/latest/# Experimental Rust port: https://github.com/chrisjsewell/markdown-it-pyrs Table and strikethrough from GFM flavour are implemented natively, and more features can be added via extensions https://markdown-it-py.readthedocs.io/en/latest/plugins.html
Nothing to decide for UX. But there was a lot of acceptance in the design Telegram channel for adding markdown filters. Same request in bug 94978 - we should make one a duplicate.
(In reply to Heiko Tietze from comment #5) > Same request in bug 94978 - we should make one a duplicate. That bug seems to be calc-specific and tables-focused. I don't object to unifying the bugs, but the one that stays up needs to be generalized.
Google Docs now supports (Importing and) Exporting Markdown: https://workspaceupdates.googleblog.com/2024/07/import-and-export-markdown-in-google-docs.html
(In reply to Antonio Vidal from comment #4) > > Markdown support. But as you said, the challenge is picking a flavour > > Would propose Markdown-it due to being 100% compliant with CommonMark, > secure by Google, and extensible with plugins > > https://github.com/markdown-it/markdown-it > Python port: https://markdown-it-py.readthedocs.io/en/latest/# > Experimental Rust port: https://github.com/chrisjsewell/markdown-it-pyrs > > Table and strikethrough from GFM flavour are implemented natively, and more > features can be added via extensions > https://markdown-it-py.readthedocs.io/en/latest/plugins.html Those are not for export, but for import. For import, an easier integration would probably be this C-based lib: https://github.com/mity/md4c Note that when dealing with importing, valid Markdown files can contain any HTML.