JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.3
[ckeditor.git] / _source / core / dom / node.js
index 02a726c..6611545 100644 (file)
@@ -659,6 +659,24 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
                        }\r
                },\r
 \r
+               /**\r
+                * Checks is this node is read-only (should not be changed). It\r
+                * additionaly returns the element, if any, which defines the read-only\r
+                * state of this node. It may be the node itself or any of its parent\r
+                * nodes.\r
+                * @returns {CKEDITOR.dom.element|Boolean} An element containing\r
+                *              read-only attributes or "false" if none is found.\r
+                * @since 3.5\r
+                * @example\r
+                * // For the following HTML:\r
+                * // <div contenteditable="false">Some <b>text</b></div>\r
+                *\r
+                * // If "ele" is the above <div>\r
+                * ele.getReadOnlyRoot();  // the <div> element\r
+                *\r
+                * // If "ele" is the above <b>\r
+                * ele.getReadOnlyRoot();  // the <div> element\r
+                */\r
                isReadOnly : function()\r
                {\r
                        var current = this;\r