Modifying the Tiny MCE editor to generate i instead of em?


I would like to modify the Tiny MCE editor used in edit mode to generate i-elements instead of em:s when the editor clicks clicks the italics tool button. Any pointers on how to do that?

Jun 30, 2010 17:57

I have not tried it myself but you can make an attempt with the following, use the code from my post and add valid_elements : "i/em"

Edited, Jul 01, 2010 8:38

That would not be enough. it would alow the i tag to be in the editor but would not change the behaviour of the italic button. it would still create em:s. I would create a new plugin (using the same visual class and such) that wraps curent selected content in an i tag. this should be a pretty simple plugin to make and would be a good practise plugin also. 


Editing the current plugin directly to instead make i tags is not recommended. since i think its a part of the advanced template somewhere or so in tinymce, its not a good place to change things considering future updates to tinyMCE/episerver. 

Jul 01, 2010 8:53

If you look at the specification for tiny mce it says "Separates element synonymous. The first element is the one that will be output. " and I can verify that it works just like that so by using the code above you will get i instead of em.

Jul 01, 2010 9:17

Ahh great then =) 


Thanks for the info I didnt know that.

Jul 01, 2010 9:20


Jul 01, 2010 22:10

You are welcome!

Jul 02, 2010 8:16
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.