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   1709 Views

Avatar
gman

Community Member, 11 Posts

23 September 2010 at 3:01am

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

Community Member, 470 Posts

23 September 2010 at 7:09am

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

Community Member, 165 Posts

2 June 2011 at 2:48am

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

Community Member, 95 Posts

8 June 2011 at 1:32am

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