X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Fnode.js;h=661154550ab0a83efd8b080952a664e8e98fb7c2;hp=02a726c5e08de168937ee694432c92f4758c66f8;hb=614511639979907ceb0da3614122a4d8eb963ad4;hpb=039a051ccf3901311661022a30afd60fc38130c9 diff --git a/_source/core/dom/node.js b/_source/core/dom/node.js index 02a726c..6611545 100644 --- a/_source/core/dom/node.js +++ b/_source/core/dom/node.js @@ -659,6 +659,24 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, } }, + /** + * Checks is this node is read-only (should not be changed). It + * additionaly returns the element, if any, which defines the read-only + * state of this node. It may be the node itself or any of its parent + * nodes. + * @returns {CKEDITOR.dom.element|Boolean} An element containing + * read-only attributes or "false" if none is found. + * @since 3.5 + * @example + * // For the following HTML: + * //
Some text
+ * + * // If "ele" is the above
+ * ele.getReadOnlyRoot(); // the
element + * + * // If "ele" is the above + * ele.getReadOnlyRoot(); // the
element + */ isReadOnly : function() { var current = this;