mvdkwast / obsidian-copy-as-html

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

Added capability to copy just the current selection #35

Closed Brradut closed 11 months ago

Brradut commented 11 months ago

Hello, I wanted to have the ability to copy just the selected text as HTML, and I gave it a try. A couple of functions now have the onlySelected parameter, which decides if the whole document should be copied, or just the current selection.

I also added an extra command, Copy selection as HTML.

Hope this helps with https://github.com/mvdkwast/obsidian-copy-as-html/issues/18.

mvdkwast commented 11 months ago

Brilliant, thanks a lot !

I will take a look at it tonight !

mvdkwast commented 11 months ago

Well, that works fine, thanks again !

To make things easier, I think we could add a command that copies the entire document if the selection is empty, or the selection otherwise. This should probably be bound to the default hotkey.