Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

TinyMCE 3.3.6 Appends custom css classes instead of replacing

Vote:
 

I'm struggling with an issue in the new TinyMCE, if i got for example two custommade classes like follows:

p.green { EditMenuName: "Grön"; ChangeElementType: true; border: 0 solid #53c238; border-left-width: 3px; padding: 3px 5px; }
p.orange { EditMenuName: Orange; ChangeElementType: true; border: 0 solid #ca3724; border-left-width: 3px; padding: 3px 5px; }

First of all notice that the name Grön is within quotation marks, otherwise it cant show å,ä,ö, doesnt matter which encoding i got (struggled with this for a while as well). But the issue is: How to remove old class when selecting a new style in the style menu?

If i first select "Grön" i got p.green, if i then select orange after, i recieve both classes cause the tinymce is adding the classes, like
p.green orange instead of replacing.

Did find one topic about this: http://www.tinymce.com/forum/viewtopic.php?id=21691

But it wont work cause EPiServer has its own methods of interpreting the css styles. Anyone has a solution for this? The file that does the interpretation is located here: C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\Application\Util\Editor\tinymce\plugins\epistylematcher\editor_plugin.js.

#57307
Mar 09, 2012 16:35
Vote:
 

Hi,

Read this article http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2011/3/Improvements-in-TinyMCE-in-EPiServer-CMS-6-R2/!

I don't know if you can replace classes, but if you select the same class again it gets removed from the element.

#57316
Mar 09, 2012 18:26
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.