Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM and TinyMCE

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1463 Views
  • sca123
    Avatar
    Community Member
    61 Posts

    DOM and TinyMCE Link to this post

    Does anyone know of a way of getting TinyMCE working in the popup DOM window. I am using HTMLEditorField which is just displaying a standard textarea with no toolbar.

    Thanks

  • UncleCheese
    Avatar
    4085 Posts
  • sca123
    Avatar
    Community Member
    61 Posts

    Re: DOM and TinyMCE Link to this post

    Thank you - but I could do with a little more help with integration of this into my existing code. This field is to replace the existing TextAreaField - Description:

    <?php
    class InfoBox extends DataObject
    {
       static $db = array (
          'Title' => 'Text',
          'Description' => 'Text',
          'Link' => 'Text'
       );

       static $has_one = array (
          'HomePage' => 'HomePage',
          'MultiBox' => 'MultiBox',
          'DropDown' => 'DropDown',
          'Image' => 'Image'
       );

       public function getCMSFields_forPopup()
       {
          return new FieldSet(
             new TextField('Title'),
             new TextAreaField('Description'),
             new TextField('Link'),
             new ImageField('Image')
          );
       }

    }
    ?>

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and TinyMCE Link to this post

    There's an example right in the documentation I sent you. It should be as easy as replacing TextareaField with SImpleWysiwygField, and you can customize from there if you want.

  • sca123
    Avatar
    Community Member
    61 Posts

    Re: DOM and TinyMCE Link to this post

    I did try this but got the error message: Fatal error: Class 'SimpleWysiwygField' not found

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and TinyMCE Link to this post

    When did you last run an update? It's been in the package for a while now.

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