A simple Obsidian plugin to copy notes as HTML to the clipboard.
- Converts the Markdown content of a note to HTML (either selected text or entire document) using Obsidian's markdown renderer.
- Cleans up the HTML from the clutter obsidian likes to add
- Removes all atrributes from tags (a list of attributes to keep can be configured in the settings)
- Removes all classes (a list of classes to keep can be configured in the settings)
- Converts internal images into base64 strings
- Removes empty paragraphs (left overs from Comment blocks, for example)
- Saves the resulting HTML to the clipboard.
Note
This plugin does generate a full HTML page and I don't intend to add that feature
- Desktop (Windows)
- iOS
- Android
Tip
On Android: Paste contents through the context menu of the text field and not through the keyboard copy option, since that method doesn't cut off the string after a certain amount of characters.
- Download the latest release from the releases page.
- Unzip the downloaded file.
- Copy the folder to your Obsidian plugins directory (usually located at
.obsidian/plugins
). - Enable the "Copy Markdown to HTML" plugin from the Settings > Community Plugins menu in Obsidian.
- Install BRAT from the Community Plugins in Obsidian.
- Open the command palette and run the command
BRAT: Add a beta plugin for testing
- Copy the project link (https://github.com/blotspot/obsidian-markdown2html) into the modal that opens up.
- Make sure Enable after installing the plugin is checked
- Click on Add Plugin
Beta plugins can be updated using the command palette by running the command Check for updates to all beta plugins and UPDATE
. Optionally, beta plugins can be configured to auto-update when starting Obsidian. This feature can be enabled in the BRAT plugin settings tab.
- Open the command palette (default is
Ctrl+P
orCmd+P
) and search for "markdown2html". - Select Copy selection or document to clipboard to save your current selection, or if nothing is selected, the full file to the clipboard.