Remove items from TinyMCE Text-formatting

Vote:
 

Where can I remove objects from TincyMCE text dropdowns? I want to remove Header 1, 4-6 and in the Styles-dropdown there's a lot of epi_pc and epi_dc-objects that's in the way. I've tried searching in the tinymce folder but it's a jungle finding it.

#70450
Apr 19, 2013 16:25
Vote:
 

Check the Tiny MCE developers guide for information on how to define styles that can be selected by the editor:

http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/7/Editing/Customizing-the-TinyMCE-Editor/

#70457
Apr 19, 2013 18:33
Vote:
 

It's going to be a little more difficult (if not impossible) to remove the epi_ related classes, since the EPiServer TinyMCE editor uses those to style the placeholders for EPi-related item, like the dynamic content and personalization containers.

If you want to see what's loaded into the editor, watch the network traffic via a browser developer tool or Fiddler when you open edit mode for an XhtmlString property, then just look for the CSS files.

#70460
Apr 19, 2013 19:28
Vote:
 

All right. I guess that I'll have to skip the styles-dropdown then.

Using the guide I've created a TinyMce-class using TinyMCEPluginNonVisual. It works fine in classic edit mode but the tinymce-editor chrashes when on on-page edit mode. Do I have to create the js-files under util/editor.. etc even though I don't have any javscript code?

My small plugin:

    [TinyMCEPluginNonVisual(
           AlwaysEnabled = true,
           EditorInitConfigurationOptions = @"{
            theme_advanced_blockformats : 'h2,h3,p'}")]
    public class EditorSettings { }

 

#70485
Apr 22, 2013 9:48
Vote:
 

@Alexander: Yes you have to create those files. 

#70487
Apr 22, 2013 10:26
Vote:
 

Thank you! Now I've got it to work.

#70491
Apr 22, 2013 10:44
Vote:
 

Optionally, you could add an empty file handler or a virtual path to an empty js to deal with the TinyMCE error. Check out this post: http://cjsharp.com/blog/2013/04/15/how-to-add-valid-elements-like-iframes-to-tinymce-in-episerver-7/

#70527
Apr 22, 2013 16:28
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.