facelessuser/ExportHtml

HTML to clipboard

Closed this issue · 6 comments

I find myself frequently needing to

  1. export to HTML Browser View,
  2. right click on browser window
  3. view source
  4. select all
  5. copy to clipboard

Could "HTML copy to clipboard" be available alongside 'Browser View' and 'Browser Print' - or am I missing a trick here?

nb: I'm still a bit confused about the clipboard capabilities in Linux (Ubuntu/Mint) now I've finally made 'the switch' - but sometimes clipboard content seems to know what it is (eg: in this case HTML) as a hint to whatever application it's being pasted into (which seemed to work more consistently in that other OS) and at other times it doesn't. So, combined with this is 'whatever' it is that will mean the clipboard content gets pasted in as HTML rather than just text, to an application that can render (to a greater or lesser degree) HTML.

Cheers.

Did you read the docs. You can configure your own command; Copying HTML to the clipboard is one option.

I assume you found your answer as I have heard no response.

Hi, just getting to this now.

My apologies for not just RTFM :-/

--J

[image: tibdit icon] http://www.tibdit.com/ tibdit
http://www.tibdit.com/

@tibdit on twitter http://www.twitter.com/tibdit

Facebook page https://www.facebook.com/pages/tibdit/470144859751000

Google+ page https://plus.google.com/+tibditMicropayments/posts
justin maxwell ceo & founder

@Justin_Maxwell_ http://twitter.com/Justin_Maxwell_

linkedin.com/in/tibditJustin

On Wed, Oct 28, 2015 at 11:45 PM, Isaac Muse notifications@github.com
wrote:

Closed #34 #34.


Reply to this email directly or view it on GitHub
#34 (comment).

No worries. I'm just telling everyone these days to read the docs. It just gets exhausting answering the same questions. I maintain a number of plugins, and I just don't have time to constantly answer what I already spent time covering in the docs.

Completely fair!

As a thought - since (unless I've not found it yet - maybe it's in the
docs) there doesn't seem to be any routine/standard way to link to docs for
installed plugins directly from inside sublime, a link in a comment at the
top of the settings file would help? [I'm aware that the link was on the
github page that I must've found to log the issue, and have kicked myself
appropriately hard!]

But - to follow on the original issue ...

I turned on *"clipboard_copy": true *and the HTML is in the clipboard - but
upon pasting (into a word processor, or this email) a copy from the opened
browser page pastes in as rich text like this:

11/24/15 07:51:55
/home/justin/.config/sublime-text-3/Packages/User/ExportHtml.sublime-settings

"clipboard_copy": true

whereas pasting directly ends up with the long raw html:

<title>ExportHtml.sublime-settings</title> _[snip]_ clipboard_copy": true _[snip]_

And what I'm really hoping to find is a way to go more directly from
sublime, to email, or write, etc

... ... ... ... but after doing a bit of hunting and learning before
sending (e.g.
http://stackoverflow.com/questions/3261379/getting-html-source-or-rich-text-from-the-x-clipboard)
I'm starting to understand that this might be a whole lot more difficult
than I had assumed. ... ... ... ...

.... .... .... and then I did a bit more digging and playing. Running this
command after Export HTML gives the desired result

xclip -out -selection clipboard | xclip -in -selection clipboard -t
text/html

I'm assuming sublime doesn't let you set the selection target thingy to text
/html , but maybe an option in the plugin to pipe through xclip as above,
as an alternative to opening the browser window (or opening in sublime)?

Cheers again,
--Justin

[image: tibdit icon] http://www.tibdit.com/ tibdit
http://www.tibdit.com/

@tibdit on twitter http://www.twitter.com/tibdit

Facebook page https://www.facebook.com/pages/tibdit/470144859751000

Google+ page https://plus.google.com/+tibditMicropayments/posts
justin maxwell ceo & founder

@Justin_Maxwell_ http://twitter.com/Justin_Maxwell_

linkedin.com/in/tibditJustin

On Tue, Nov 24, 2015 at 4:24 PM, Isaac Muse notifications@github.com
wrote:

No worries. I'm just telling everyone these days to read the docs. It just
gets exhausting answering the same questions. I maintain a number of
plugins, and I just don't have time to constantly answer what I already
spent time covering in the docs.


Reply to this email directly or view it on GitHub
#34 (comment)
.

Ahh, now I understand what you want. Yeah, in order to have HTML content pasteable as HTML and not text, you have format things special in the clipboard (and I think that can vary form OS to OS). Having a user manually do it from the webbrowser I find is the best compromise for me. It is what I do. I guess if I found a really good library that could be dropped into sublime, i would use it, but until then...