+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / RefreshUI and ApplyChanges to RadEditor in SF 6

RefreshUI and ApplyChanges to RadEditor in SF 6

4 posts, 0 answered
  1. Richard
    Richard avatar
    103 posts
    Registered:
    04 Apr 2013
    06 Dec 2014
    Link to this post

    i'm updating a textbox to a radeditor in a sf6 project.

     I'm not sure if I'm getting the radeditor properly or if I'm not setting the value properly. RefreshUI does this. 

     jQuery(this.get_bodyText()).val("testBodyText");

    found a few other methods but either it's not supported, or it updates the entire editor with text. 



  2. Richard
    Richard avatar
    103 posts
    Registered:
    04 Apr 2013
    06 Dec 2014
    Link to this post
    Well that's awkward. Pardon the double post. The site showed 500 error so I just tried reposting. 
  3. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    08 Dec 2016
    06 Apr 2015
    Link to this post
    Hi Richard,

    Can you try using set_html instead? For instance:

    refreshUI: function () {
        var controlData = this._propertyEditor.get_control();
         
        if (controlData.TextExample) {
            this.get_textexample().set_html(controlData.TextExample);
        }
    },


    Best,
    Junior Dominguez
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    06 Apr 2015 in reply to Junior Dominguez
    Link to this post

    @Richard

      You need to use the MSAjax api for the old RadEditor

    http://www.telerik.com/help/aspnet-ajax/editor-getting-familiar-with-client-side-api.html

     

    So use jQuery to find the ID of that widget like

    var id = $("[id$='MyEditor']").attr("id"); //Gets the long-asp generated name

     Then get the reference to the MSAjax object

    var editor = $find(id);

    Now feel free to use any of the client API calls.  This goes for all RadControls, not just the RadEditor.

     

4 posts, 0 answered