Copy as HTML? View Preview Source?
CompletedIn nvAlt, I had the option to easily toggle the Preview window from Markdown to the HTML generated by the Markdown. This allowed me to quickly type up a document using Markdown syntax, turn the Markdown into HTML, then copy the resulting HTML to BBEdit for further formatting (to create an HTML-based blog post, for example).
This function seems to be missing in nvUltra. The closest I can get is to "Print Preview Using Browser", then view the resulting page source, and grab the tiny bit of HTML from the end of the source file.
Is this the intent of the new "Copy as HTML" command (which, at the moment, doesn't seem to do anything)?
-
Copy as HTML is actually superior to source view (IMO). You just have to select a block of Markdown before using it and you'll get the HTML for that specific snippet (or ⌘A for the whole document). This way, for partial copies, you don't have to scrub the source for the section you want.
0 -
Weird. I was trying all day to use this command, and even with all of my years of using Markdown and various Markdown editors I was still stumped.
My first assumption was that I needed to make sure the Preview pane had focus, or that I had to select the text in the Preview pane and then select Copy as HTML, but in this case the command was disabled.
I then just tried placing my cursor in the editor window, in which case Copy as HTML was enabled, but when clicked didn't appear to actually do anything.
It never occurred to me that I have to select the text I want to copy in the editor window first, then select Copy as HTML. Sort of obvious in retrospect, but in my experience with other Markdown editors, selecting Copy as HTML tends to be an all-or-nothing operation. In MacDown, for example, when selecting Copy HTML, you get ALL of the HTML, not a currently selected subset.
Thanks for clearing it up. Your approach is great; it just conflicted with some preconceived notions about how I thought it would work based on my experience in other environments.
This might not be a problem for other people, since their previous experiences and preconceived notions are likely to be different than mine. (It's also very possible that I'm just dumb :-)
0 -
One follow-up idea:
Currently, if NO text is highlighted, the Copy As HTML/Copy as LaTeX commands are enabled, but selecting them essentially does nothing.
A more intuitive way for this to work is if no text is highlighted, automatically copy the entire document as if it *was* highlighted.
Barring this, I'd suggest disabling the Copy As commands until text is selected (though I think this would be a bit less intuitive — it would leave people wondering why the commands aren't enabled).
(Personally, I got tripped up by this again today, even though I've already *learned* that I need to select the whole document before selecting Copy As HTML for it to work as I expect it to work.)
0 -
I agree that if nothing is selected either that menu option should be disabled or the entire document should be copied. I prefer the latter option.
0 -
A zero-width selection now selects the entire document.
0
Please sign in to leave a comment.
Comments
5 comments