views:

550

answers:

1

When viewing a webpage, I would like to copy a selection of text with its html formatting in one piece. Meaning if some text is in bold and blue, I want the tool to create a style or class in the html which makes the text blue. Everything is contained in the produced html.

I have downloaded a similar plugin but the classes definitions are still external which means I have to get them separately. A non technical user would be at a loss here. I want the user to be able to copy and paste to a new webpage and that page just just works properly because the html copied contains everything.

This doesn't have to be a FF plugin. It could be IE or a Windows app.

A: 

I think the copy operation does this already. If I copy this page and paste it in a WYSIWYG editor such as TinyMCE (included in Wordpress), I get the formatting. For example the text of this page is (as pasted):

<h2><a href="http://stackoverflow.com/questions/365603/firefox-plugin-to-copy-text-with-its-formatting-intelligently"&gt;Firefox plugin to copy text with its formatting Intelligently?</a></h2>

The HTML markup is copied, but not external CSS. I suspect creating a piece of CSS that would apply to your standalone snippet of code the style it had within the DOM hierarchy would be horribly difficult if at all possible.

Christian Lescuyer
The plugin I mentioned copies as html but it doesn't copy the css information. A plugin like Firebug displays the css when you inspect any element. What I am asking is for the tool to grab that css and put it as an inline css. I don't see how that would be too difficult.
Abdu