Null style for a given element and all child elements within?

Caporegime
Joined
18 Oct 2002
Posts
29,493
Location
Back in East London
One of the sites I've created uses TinyMCE for the content. The user is copying content from word doc's into the field, then saving and due to the various style attrib's for the rest of the site, it is interfering with the style of the tinymce content.

So.. I would like to be able to do something like:

Code:
div#article, div#article * { style: none !important; }
to "null" all the style.

Possible?
 
Unfortunately, while you can enforce inheritance of a particular property, I don't think there is any way to turn off all inheritance for a particular selector.

I've had this problem in the past when trying to use relative font-sizes, where a "dont inherit" option would be useful, but I think the best you can do is to reset each individual property which adds a fair bit of css.
 
I recently had this problem and didn't find a solution as i ran out of time to investigate, but I'd be interested to hear what you find.

I do know however, that FCKEditor has a specific function to cover pasting from Word, which I assume strips out the format data that word 'helpfully' puts in.
 
Ta,

I'd needed not bother in the end; I've been able to place the #article div at a sufficiently high enough level that it no longer has any styled elements to inherit from :)

However, Firefox's default settings prevents Javascript from accessing the clipboard, so I've got another PITA to deal with now.
 
However, Firefox's default settings prevents Javascript from accessing the clipboard, so I've got another PITA to deal with now.

slight hijack - is there a setting you can change then? i'd like to able to use to firefox/javascript to copy the content of a text area TO the clipboard. i've googled but what i've found is IE only.....
icon7.gif


(to be fair i'm insanely lazy. i've already got some js that highlights all the text, but anything to save 1 click.
icon10.gif
)
 
It's a client side setting, there is no way for Javascript to enable it - ergo, there is no way for the webapp to do it. I haven't tried SSL to see if it allows it though.
 
Back
Top Bottom