Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Problems with the silverstripe tinymce implementation

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 2753 Views
  • Davis
    Avatar
    Community Member
    5 Posts

    Problems with the silverstripe tinymce implementation Link to this post

    I am updating a tinymce editor instance from within my javascript code like this:

    tinyMCE.setContent(this.datems.Content);

    where this.datems.Content contains html code such as: <h1>Some Header</h1>.

    When I test this within an untouched copy of tinymce outside of the silverstripe cms I have no problems. It translates over beautifully. But when I run this within the silverstripe cms I get jumpled messes: primarily that it encodes my brackets so that I see the source code in the wysiwyg view. When I view the source of it I see something like &lt;p&gt;&amp;lt;h1&amp;gt;Some Text&amp;lt;/h1. Obviously the html is being rewritten.

    So I took the plunge into the tiny_mce javascript and found the _setHTML method that silverstripe uses to intercept the setContent and updateContent methods. Within this method your all kinds of things are being rewritten.

    My question is is what does _setHTML expect so that my code comes unscathed out the other side (ie: not having all the bracket characters of my HTML tags all construed).

    cheers,
    davis

  • Davis
    Avatar
    Community Member
    5 Posts

    Re: Problems with the silverstripe tinymce implementation Link to this post

    I have been able to unescape html characters for the tinyMCE, though it was a bit of a hack of the silverstripe system. I still have strange things happening like bolding of text visually being bolded but not 'sticking' when viewing the tinyMCE source code and when saving back out.

    What I need to do is simple:
    I have one tinyMCE instance within the CMS admin that I need to load html content into and get html content out of dynamically via javascript calls. I believe that silverstripe does this everytime a user navigates between pages. What is the best way to dynamically load and retrieve html content from the editor within silverstripe.

    I am up against the gun on this project and would really appreciate a response as soon as possible.

  • BigB
    Avatar
    Community Member
    9 Posts

    Re: Problems with the silverstripe tinymce implementation Link to this post

    Hi, having the same problem... I don't see any responses yet did you find a solution? Thanks

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