Hi everyone,
I have various texts in LibreOffice Writer and just as many in Obsidian. In both programs, the texts are formatted using the respective options. If I need an Obsidian text in a Writer file, I can of course copy and paste it, but unfortunately, Writer doesn’t understand how to convert _ to bold.
Or does it?
If anyone knows how to do this, I’d be grateful for any hints.
Use the “Copy Document as HTML” plugin
That will populate the clipboard with HTML formatted text which can be pasted into apps that support rich text like Libreoffice or MS Office
Ahh - wonderful. That already works in one direction (from Obsidian to LibreOffice Writer). Very nice. Thank you very much.
I hardly dare hope that you or anyone else knows anything about the reverse process (Writer → Obsidian).?
By default Obsidian tries to convert rich text to Markdown when you paste it in a note (there is a setting to disable this). Does that work?
It works—I’d say—to some extent. Chapter headings are (at least) transferred with their numbering, but unfortunately not as headings, so the table of contents transferred as text cannot be replaced by viewing the headings (as is usual in Obsidian). Tables are unfortunately not transferred as Markdown, and images are not transferred at all.
Shouldn’t I have simply pressed ‘cmd+V’ instead of another keystroke to convert more formatting?
Yes, Cmd+V does it (if Settings > Editor > Convert pasted HTML to Markdown is enabled, which it is by default). Sometimes formatting just doesn’t transfer well between apps. And images will be tricky because in Markdown they are separate, not part of the file (unless encoded as base64, which adds huge amounts of gibberish to the file text). Here are some options:
- Export the doc as HTML, then use the Importer plugin (which is maintained by Obsidian’s developers): Import HTML files - Obsidian Help
- Upload the doc to Google Docs and from there export to Markdown.
- Use an app called Pandoc that converts between file types, but it is a command line app. I think someone made a graphical app to control it but I don’t remember the name.