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

Avatar
NickJacobs

Community Member, 144 Posts

5 March 2009 at 12:44pm

Edited: 06/03/2009 12:16pm

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

Administrator, 685 Posts

5 March 2009 at 2:10pm

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

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

Avatar
NickJacobs

Community Member, 144 Posts

5 March 2009 at 3:37pm

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

Administrator, 685 Posts

5 March 2009 at 5:27pm

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

Community Member, 144 Posts

6 March 2009 at 12:13pm

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

Community Member, 181 Posts

11 March 2009 at 5:08am

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

Community Member, 5 Posts

24 May 2009 at 10:07pm

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

thx Sunny

Avatar
Willr

Forum Moderator, 5513 Posts

25 May 2009 at 5:49pm

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

Go to Top