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.

Customising the CMS

[SOLVED] HtmlEditorField - are you out there??


Go to End
Reply

9 Posts   3062 Views

Avatar
NickJacobs

5 March 2009 at 12:44pm (Last edited: 6 March 2009 12:16pm), Community Member, 144 Posts

Hi, I've been trying to alter the tinymce in 2.3 using the documentation in various places in the forums and docs. It seemed to me that changing values in HtmlEditorField.php should affect the toolbar in the editor (it did work in previous sites on older versions of SS), but even if I comment out most of the toolbar stuff in HtmlEditorField.php there are no changes in the toolbar.....so where is this configured if not in HtmlEditorField.php???

Really need help on this please!

Avatar
Sam

5 March 2009 at 2:10pm Administrator, 679 Posts

sapphire/javascript/HtmlEditorField.js configures the TinyMCE toolbar in the front-end.

cms/javascript/tinymce.template.js configures it in the CMS.

Avatar
NickJacobs

5 March 2009 at 3:37pm Community Member, 144 Posts

Thanks Sam, what I'm trying to do is change the label values on the 'FormatSelect' (ie Header1, Header2 etc), I thought this was controlled by HtmlEditorField.php. If not, where is this controlled?
Cheers

Avatar
Sam

5 March 2009 at 5:27pm Administrator, 679 Posts

HtmlEditorField.js - I recommend that you look at the TinyMCE documentation. The stuff in HtmlEditorField.php is legacy code and should be ignored.

Avatar
NickJacobs

6 March 2009 at 12:13pm Community Member, 144 Posts

Thanks Sam,

I checked TinyMCE's docs and just added this line to tiny.mce.template.js:

theme_advanced_blockformats : "Page Title=h1;Blue Sub Heading=h2;Green Sub Heading=h3;Body Text Bold+2=h4;Body Text=p",

works a treat!

Avatar
Ben Gribaudo

11 March 2009 at 5:08am Community Member, 181 Posts

Sam,

Is it safe to submit a patch to remove the portions of HtmlEditorField.php code (such as the Buttons method) that are unused by the CMS?

Thank you,
Ben

Avatar
SunboX

24 May 2009 at 10:07pm Community Member, 5 Posts

Can a developer plz add a function (argument ...) to HtmlEditorField.php to change the Toolbar in php code?

thx Sunny

Avatar
Willr

25 May 2009 at 5:49pm Forum Moderator, 5511 Posts

SunboX - to request an api change or a feature please make a ticket on open.silverstripe.com

Go to Top