Jump to:

1971 Posts in 1275 Topics by 607 members

Form Questions

SilverStripe Forums » Form Questions » TinyMCE editor not submitting content

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

Page: 1
Go to End
Author Topic: 1079 Views
  • NicoHaase
    Avatar
    Community Member
    6 Posts

    TinyMCE editor not submitting content Link to this post

    Hi folks,
    I'm currently developing a website which should contain a simple front-end administration. The form is generated using $fields = singleton('DataObject')->getFrontEndFields(), and my dataobject contains three fields of type HTMLText. These should be editable through TinyMCE editors, which is done through the framework. Well, they are editable, but the content of these fields is empty after submitting the form. I tried really a lot, from tracking down the JS code to tinyMCE.triggerSave() (not resolving the problem), to call of tinyMCE.getInstanceById('Form_EditForm_FieldName').getContent() (which returns an empty string),.... and after hours of headache, I have no clue left where to search for a call I omitted... can anyone help here?
    Kind regards from sunny Germany
    Nico

  • NicoHaase
    Avatar
    Community Member
    6 Posts

    Re: TinyMCE editor not submitting content Link to this post

    Just in case anyone else runs into this problem, this is the solution. Short and simple....

    $mceConfig = HtmlEditorConfig::get();
    $mceConfig->disablePlugins('spellchecker', 'emotions');
    $mceConfig->setOptions(array(
             'mode' => 'none'
    ));
    HtmlEditorConfig::set_active();

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