The custom styles drop down in TinyMCE seems to be able to insert either a tag (say, <pre />) or a css class (say .code) but can I get a single selection item that does both at once?
I tried having the alias of the style pre .code but it only added the <pre /> tag.
The tinyMCE config will need to be edited to allow for the class attribute to be applied to 'pre'
i.e:
pre[class]
On this same note of TinyMCE and pre tags, it seems to always strip out white space from pre tags which is bad since that is what pre is for. I've found with other TinyMCE installs, that you need to set: apply_source_formatting = false so it doesn't strip out the white space. This obviously means that it won't cleanup the html code though :(
I've tried the preelementfix plugin but that doesn't seem to fix this problem either.
TinyMCE - setting HTML tag + css class
The custom styles drop down in TinyMCE seems to be able to insert either a tag (say, <pre />) or a css class (say .code) but can I get a single selection item that does both at once?
I tried having the alias of the style pre .code but it only added the <pre /> tag.
Can both be done?
The tinyMCE config will need to be edited to allow for the class attribute to be applied to 'pre'
i.e:
pre[class]
On this same note of TinyMCE and pre tags, it seems to always strip out white space from pre tags which is bad since that is what pre is for. I've found with other TinyMCE installs, that you need to set: apply_source_formatting = false so it doesn't strip out the white space. This obviously means that it won't cleanup the html code though :(
I've tried the preelementfix plugin but that doesn't seem to fix this problem either.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.