Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Enable tinymce plugins


Reply

4 Posts   1675 Views

Avatar
gman

23 September 2010 at 3:01am Community Member, 11 Posts

Running 2.4.2
Windows Server 2003 R2
Apache 2.2.11
PHP 5.3.3

Is it possible in SilverStripe implementation of tinymce to enable plugins that are not enabled by default. For example, what would I have to do to enable the layer plugin.

Avatar
Liam

23 September 2010 at 7:09am Community Member, 470 Posts

You can put these in your site config to add or remove plugins/buttons.

HtmlEditorConfig::get('cms')->enablePlugins('media', 'safari');
HtmlEditorConfig::get('cms')->insertButtonsAfter('ssimage', 'media');
HtmlEditorConfig::get('cms')->insertButtonsAfter('strikethrough', 'removeformat');
HtmlEditorConfig::get('cms')->removeButtons('tablecontrols', 'indent', 'outdent', 'anchor', 'ssflash', 'underline');

You can customize the position, plugin etc. Use which ever ones you need.

Avatar
Optic Blaze

2 June 2011 at 2:48am Community Member, 162 Posts

This worked for me

//Enable layers plugin in the WYSIWYG editor//
HtmlEditorConfig::get('cms')->enablePlugins('layer');
HtmlEditorConfig::get('cms')->insertButtonsAfter('tablecontrols', 'insertlayer', 'absolute');

Avatar
Mackodlak

8 June 2011 at 1:32am Community Member, 95 Posts

Can you do it in blog module frontend entry posting and editing?