Jump to:

5449 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » [SOLVED] HtmlEditorField - are you out there??

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

Page: 1 2
Go to End
Author Topic: 2904 Views
  • NickJacobs
    Avatar
    Community Member
    144 Posts

    [SOLVED] HtmlEditorField - are you out there?? Link to this post

    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!

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

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

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

  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

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

  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

    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!

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

    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

  • SunboX
    Avatar
    Community Member
    5 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

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

    thx Sunny

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: [SOLVED] HtmlEditorField - are you out there?? Link to this post

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

    2904 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.