Jump to:

3431 Posts in 1058 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » SimpleTinyMCE

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

Page: 1
Go to End
Author Topic: 799 Views
  • Samba Sam
    Avatar
    Community Member
    85 Posts

    SimpleTinyMCE Link to this post

    Hi,
    I'm trying to customize the SimpleTinyMce in my DOM pop_up using the code supplied in Uncle Cheese's thread: http://www.silverstripe.org/dataobjectmanager-module-forum/show/262243?start=0

    I am getting an error with the following code regarding SimpleTinyMce:

    <?php
    class Link extends DataObject
    {
       static $db = array (
       'AltText' => 'Varchar(50)',
       'TitleText' => 'Varchar(50)',
       'Description' => 'Text',
       'LinkUrl' => 'Varchar(50)'
    );

       static $has_one = array (
       'LinksPage' => 'LinksPage',
       'LinkImage' => 'Image'
    );

    public function getDOMThumbnail()
       {return $this->LinkImage()->CroppedImage(50,50);}

    function getCMSFields_forPopup()
    {
       return new FieldSet(
       new ImageField('LinkImage'),
       new TextField('AltText'),
       new TextField('TitleText'),
       new TextField('LinkUrl'),
       $myfield = new SimpleTinyMCEField('Description');
       $myfield->setButtons(array(
       'cut,paste,|,undo,code','bold,italic,underline,|,justifyleft,justifyright'));
    }
    }
    ?>

    Any help would be appreciated,
    Sam

  • Samba Sam
    Avatar
    Community Member
    85 Posts

    Re: SimpleTinyMCE Link to this post

    Hi again,
    I moved this post over to the correct forum which is DataObjectManager Module.
    Sam

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