Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » The Trouble with TinyMCE

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1933 Views
  • aerocapture
    Avatar
    2 Posts

    The Trouble with TinyMCE Link to this post

    The SilverStripe CMS is certainly pretty, and the back end is clearly easy to use for non-programmers. But it's just not quick enough or reliable enough for use by webdevs or someone trying to migrate from another CMS.

    TinyMCE in particular is maddening. The controls are intermittent at best, and I need a way to enter raw HTML or -- even better -- Markdown-formatted text, directly. Yes, I'm aware of the HTML button on the TinyMCE panel, but it doesn't always work. Power users need to have the option of *not* using the WYSIWYG editor, just like you have in Wordpress, etc.

    If there's any way to override TinyMCE, I'd love to hear about it.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: The Trouble with TinyMCE Link to this post

    Well, it's not easy to provide UI controls to switch the WYSIWYG editor on and off at will, but you can rip it out of the CMS altogether for a specific site, and provide a simple textarea.

    To get you started, put the following into your Page class.

    function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->removeFieldFromTab("Root.Content.Main", "Content");
    $fields->addFieldToTab("Root.Content.Main", new TextareaField("Content"));
    }

    Polish work, such as removing the TinyMCE toolbar, is left as an exercise for the reader. Looking at cms/templates/includes/CMSMain_right.ss should get you started.

    We are working on extending our 'administration system' beyond the requirements of simple content management, and in time, this will probably lead to reduced coupling with TinyMCE.

    However, one thing that we will *NEVER* do is design a CMS authoring interface for programmers. Our CMS is designed for people are familiar with common business applications such as Word and Outlook. Admin & communications staff are a good example of this.

  • aerocapture
    Avatar
    2 Posts

    Re: The Trouble with TinyMCE Link to this post

    Sam, thanks a bunch for the quick and detailed reply. I'll get started right away!

    1933 Views
Page: 1
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.