How to replace <b> with <strong> in TinyMCE for Plone
I want to replace the bold tag with a strong tag in TinyMCE. How to do it in Plone using products. TinyMCE?
I read the TinyMCE document, http://www.tinymce.com/wiki.php/Configuration:valid_elements . The following describes how to do this in TinyMCE:
tinyMCE.init({
...
valid_elements : "strong/b"
});
Thank.
+3
3 answers
I have never tested this change, however you can try what you learned as "tiny_mce_init.js".
For this, I suggest using z3c.jbot (see also http://blog.keul.it/2011/06/z3cjbot-magical-with-your-skins.html ).
+2
The answers keul and Thariama are correct. I need to combine both answers for TinyMCE to work in Plone.
Here's how I do it - fixing / redefining tiny_mce_init.js with the name Products.TinyMCE.skins.tinymce.tiny_mce_init.js using z3c.jbot.
function TinyMCEConfig(id) {
...
this.init = function() {
...
var init_dict = {
...
fix_list_elements : false,
extended_valid_elements : "strong/b",
// Override internal formats
formats: {
bold : {inline : 'strong' }
}
};
...
};
...
}
+1