Copy (X)HTML code to clipboard as HTML (in Windows: CF_HTML format), rather than text?
Submitted by Friday, 22 June, 2012 - 03:44
on
I can already select content in a web browser, copy it to the clipboard, and then, in jEdit, select "Edit > More Clipboard > Paste Special > html" to paste the HTML source of the content into jEdit. I realize that I could also use various other methods to do this (such as viewing the HTML source in the web browser, and then copying that HTML source view into the clipboard, and then pasting into jEdit without "Paste Special"), but, in many cases, I like selecting the rendered objects in the web browser (although, admittedly, selecting in the HTML source view can offer greater accuracy in terms of exactly how much you are selecting).
Okay: copying (X)HTML source into jEdit is covered.
Suppose that I edit the HTML source, and now want to copy that edited content back into the browser?
I should clarify my use case: I'm copying content from a browser-based rich text editor (specifically, the Atlassian Confluence 4 rich text editor, which is based on TinyMCE), pasting it into jEdit as HTML source, editing the HTML, and then copying'n'pasting that edited content back into the rich text editor.
Currently, copying the edited content back into the browser is a multi-step procedure, to ensure that the HTML is in the appropriate internal clipboard format (in Windows, I think this means CF_HTML), so that the content is rendered appropriately by the rich text editor, rather than appearing as text (the HTML source code):
1. In jEdit, I save the edited HTML to a file (with a file extension such as .htm or .html)
2. I open the file in a web browser (say, Firefox)
3. I select the content, and copy it to the clipboard
4. I paste the content into the Confluence rich text editor
I would rather have a "Copy Special > html" option in jEdit, hence this forum topic.
Does jEdit, or one of its plugins, already have such a feature?
If not (in which case, I guess I'll add a feature request), can anyone suggest a quicker existing non-jEdit method than the "save to .htm, select and copy" method I'm currently using? (I'm using Windows 7. I have no jEdit plugin development experience, but I have some scripting experience, and it's occurred to me to write some script "glue" to copy into CF_HTML format.)
Okay: copying (X)HTML source into jEdit is covered.
Suppose that I edit the HTML source, and now want to copy that edited content back into the browser?
I should clarify my use case: I'm copying content from a browser-based rich text editor (specifically, the Atlassian Confluence 4 rich text editor, which is based on TinyMCE), pasting it into jEdit as HTML source, editing the HTML, and then copying'n'pasting that edited content back into the rich text editor.
Currently, copying the edited content back into the browser is a multi-step procedure, to ensure that the HTML is in the appropriate internal clipboard format (in Windows, I think this means CF_HTML), so that the content is rendered appropriately by the rich text editor, rather than appearing as text (the HTML source code):
1. In jEdit, I save the edited HTML to a file (with a file extension such as .htm or .html)
2. I open the file in a web browser (say, Firefox)
3. I select the content, and copy it to the clipboard
4. I paste the content into the Confluence rich text editor
I would rather have a "Copy Special > html" option in jEdit, hence this forum topic.
Does jEdit, or one of its plugins, already have such a feature?
If not (in which case, I guess I'll add a feature request), can anyone suggest a quicker existing non-jEdit method than the "save to .htm, select and copy" method I'm currently using? (I'm using Windows 7. I have no jEdit plugin development experience, but I have some scripting experience, and it's occurred to me to write some script "glue" to copy into CF_HTML format.)