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 /

Removing tinymce


Reply


6 Posts   1723 Views

Avatar
tom_a_sparks

Community Member, 11 Posts

16 December 2008 at 12:47pm

how do I remove tinymce?

Avatar
Willr

Forum Moderator, 5513 Posts

16 December 2008 at 1:13pm

If you want to get rid of it then I think you can replace the HTMLEditorField with a TextareaField.

- Page.php-

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeByName('Content')';
$fields->addFieldToTab('Root.Content.Main', new TextareaField('Content');
return $fields;

Give that a whirl and see what happens!

Avatar
tom_a_sparks

Community Member, 11 Posts

16 December 2008 at 6:19pm

where? what page.php?

Avatar
Liam

Community Member, 470 Posts

16 December 2008 at 6:58pm

In your /mysite/code/ directory.

Avatar
tom_a_sparks

Community Member, 11 Posts

16 December 2008 at 11:23pm

nope not there

<?php

class Page extends SiteTree {
   static $db = array(
   );
   static $has_one = array(
);
}

class Page_Controller extends ContentController {
   function init() {
      parent::init();
      
      Requirements::themedCSS("layout");
      Requirements::themedCSS("typography");
      Requirements::themedCSS("form");
   }
}

?>

Avatar
Liam

Community Member, 470 Posts

17 December 2008 at 3:09pm

Yes, you need to add the above function to that page, under the has_one array.

I'd suggest reading the tutorials so you have a better understanding of SS and how it works.

http://doc.silverstripe.com/doku.php#level_1building_your_first_silverstripe_website