title: Changing the value of a Telerik RadEditor with Javascript/jQuery
body: <p>I'm trying to manually clean the HTML of a Telerik RadEditor with Javascript but I can't seem to find the correct place to store the value so that it gets saved on post back.</p>
  
  <p>Here's the JS I have:</p>
  
  <pre><code>$(function () {    
      jQuery.fixHash = function ($html) {      
  
          // modify $html
  
          return $html;
      };
  
      $("#adminEditingArea input[id$='SaveButton']").unbind("click").click(function () {
          $("iframe[id$='_contentIframe']").trigger("save");
  
          // call .net postback
  
          return false;
      });
  
  });
  
  var editorSaveEventInit = false;
  function InitSaveEvent() {
      if (!editorSaveEventInit) {
          var $EditFrames = $("iframe[id$='_contentIframe']");
          if ($EditFrames &amp;&amp; $EditFrames.length &gt; 0) {
              $EditFrames.bind("save", function (e) {
                  var $thisFrame = $(this);
                  var thisFrameContents = $thisFrame.contents();
                  if (thisFrameContents) {
                      var telerikContentIFrame = thisFrameContents.get(0);
                      var $body = $("body", telerikContentIFrame);
                      var html = $.fixHash($body).html();
                      $body.html(html);
  
                      // also tried storing the modified HTML in the textarea, but it doesn't seem to save:
                      //$thisFrame.prev("textarea").html(encodeURIComponent("&lt;body&gt;" + html + "&lt;/body&gt;"));
                  }
              });
              editorSaveEventInit = true;
          }
      }
  };
  
  $(window).load(function () {
      InitSaveEvent();
  });
  </code></pre>
  
  <p>Is there any way to access the Telerik RadEditor object with JavaScript (using <code>OnClientCommandExecuted()</code>?) so that I can access the <code>.get_html()</code> and <code>.set_html(value)</code> functions? If not, what values do I need to set before posting back?</p>