I'm pulling my hair out trying to get the RTE in Umbraco 7 to accept HTML b tags when pasting HTML in the "Source code" window. As soon as I click OK, tinyMCE strips them away. Pasting HTML with strong tags however works fine. I've tried fiddling With the tinyMceConfig.config and the validElements tag, without any luck.
Does anyone else have the same problem and knows how to get around it?
The world of tinymce validElements is very strange...
By default with Umbraco for the b tag you have an entry that says:
-strong/-b[class|style]
the slash here means, whenever there is a b tag, replace it with a strong tag, ie b tags aren't allowed!
so to enable b tags, you need to remove this and have a seperate entry for b tags, eg:
-strong[class|style],-b[class|style],
This enables both string and b tags to be entered into tinymce
Two other gotchas though...
with the - in front of the b tinymce will strip empty tags eg
if you need to allow empty b tags you need to replace the - with a #
eg
-strong[class|style],#b[class|style],
and final gotcha, which gets me everytime, is you need to do an app pool recycle, after each change to the configuration to see the results of the change in Umbraco!!
tinyMCE HTML tidying
I'm pulling my hair out trying to get the RTE in Umbraco 7 to accept HTML b tags when pasting HTML in the "Source code" window. As soon as I click OK, tinyMCE strips them away. Pasting HTML with strong tags however works fine. I've tried fiddling With the tinyMceConfig.config and the validElements tag, without any luck.
Does anyone else have the same problem and knows how to get around it?
Hi Bendik
The world of tinymce validElements is very strange...
By default with Umbraco for the b tag you have an entry that says:
the slash here means, whenever there is a b tag, replace it with a strong tag, ie b tags aren't allowed!
so to enable b tags, you need to remove this and have a seperate entry for b tags, eg:
This enables both string and b tags to be entered into tinymce
Two other gotchas though...
with the - in front of the b tinymce will strip empty tags eg
if you need to allow empty b tags you need to replace the - with a #
eg
and final gotcha, which gets me everytime, is you need to do an app pool recycle, after each change to the configuration to see the results of the change in Umbraco!!
hope that helps with your b tags!
regards
Marc
Thanks Marc!
I finally got it to work! Indeed a very strange world...
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.