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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

The Trouble with TinyMCE


Go to End


3 Posts   2291 Views

Avatar
aerocapture

2 Posts

22 April 2008 at 2:31pm

Edited: 22/04/2008 2:38pm

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.

Avatar
Sam

Administrator, 690 Posts

23 April 2008 at 12:41am

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.

Avatar
aerocapture

2 Posts

23 April 2008 at 4:08am

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