Jump to:

5515 Posts in 1734 Topics by 1220 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Removing tinymce

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

Page: 1
Go to End
Author Topic: 1617 Views
  • tom_a_sparks
    Avatar
    Community Member
    11 Posts

    Removing tinymce Link to this post

    how do I remove tinymce?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Removing tinymce Link to this post

    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!

  • tom_a_sparks
    Avatar
    Community Member
    11 Posts

    Re: Removing tinymce Link to this post

    where? what page.php?

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Removing tinymce Link to this post

    In your /mysite/code/ directory.

  • tom_a_sparks
    Avatar
    Community Member
    11 Posts

    Re: Removing tinymce Link to this post

    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");
       }
    }

    ?>

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Removing tinymce Link to this post

    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

    1617 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.