Code = code;
      }
      else {
        if (code != getCode()) {
          clearErrors();
          editor.setScrollTop(0);
          editor.setValue(code);
        }
      }
    }

    function getScrollTop() {
      return editor.getScrollTop();
    }

    function setScrollTop(top) {
      if (editor !== null) {
        editor.setScrollTop(top);
      }
    }

    function isReady() {
      return editor != null;
    }

    function setReadOnly(readOnly) {
      editor.updateOptions({ "readOnly": readO