docs: function updateFrame(editor, checkForChange) {
      
      var code = editor.$area.val(),
        options = editor.options,
        updateFrameCallback = options.updateFrame,
        $body = $(editor.doc.body);
  
      // Check for textarea change to avoid unnecessary firing
      // of potentially heavy updateFrame callbacks.
      if (updateFrameCallback) {
        var sum = checksum(code);
        if (checkForChange && editor.areaChecksum == sum)
          return;
        editor.areaChecksum = sum;
      }
  
      // Convert the textarea source code into iframe html
      var html = updateFrameCallback ? updateFrameCallback(code) : code;
  
      // Prevent script injection attacks by html encoding script tags
      html = html.replace(/<(?=\/?script)/ig, "&lt;");
  
      // Update the iframe checksum
      if (options.updateTextArea)
        editor.frameChecksum = checksum(html);
  
      // Update the iframe and trigger the change event
      if (html != $body.html()) {
        $body.html(html);
        $(editor).triggerHandler(CHANGE);
      }
  
    }