mvdkwast / obsidian-copy-as-html

Obsidian plugin: copy document as HTML, including images
MIT License
42 stars 11 forks source link

FR: Copy as HTML content only, not full page #27

Closed KuraFire closed 9 months ago

KuraFire commented 1 year ago

Is your feature request related to a problem? Please describe. I like this plugin except for the fact that it creates an entire HTML page document, instead of just HTML for the contents of the note. I'm not looking to paste the entire page into a blank text file and save it as .html, or use it to compose a styled email. I just want to "copy as HTML" much in the same way that the Ulysses writing app offers natively: Copy As > HTML. It just takes the markdown and converts it to HTML without adding any fluff.

Describe the solution you'd like A second hotkey option (so that we can choose which one to use, or use both with different hotkeys) that is something like "Copy as content HTML" or so. Although preferably, I would rename the existing hotkey to "Copy as HTML Page" and this new option "Copy as HTML contents"

Describe alternatives you've considered The alternative I've considered is not using this plugin and writing in Ulysses.

mvdkwast commented 11 months ago

Hi @KuraFire, thanks for reporting. If you haven't switched yet, would a setting instead of an extra hotkey be acceptable for you ? I'm afraid that adding too many actions/hotkeys especially for technicalities like how HTML is generated would become confusing for not so technical users.

mvdkwast commented 11 months ago

Another thought about this : you say It just takes the markdown and converts it to HTML without adding any fluff. How is styling handled in this case ? Or do you expect bare HTML without styling ?

This plugin exports as a HTML document for 2 reasons :

vasilisvg commented 11 months ago

I would very much like this, or a similar feature, as well. I would use it to copy the content into my own websites, and these sites already have their own styling. For this I only need the content, and no <head>, just the part that right now is put into the <div>. So just the bare HTML of the content, without any styling.

mvdkwast commented 10 months ago

Thanks @vasilisvg, this makes sense. That wasn't a use-case I had in mind when I developed this, but should be pretty easy to do. I will try to include this in the next release.