JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.2
[ckeditor.git] / _source / plugins / indent / plugin.js
index 7967c78..b0c82bf 100644 (file)
@@ -15,6 +15,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
        function onSelectionChange( evt )\r
        {\r
+               if ( evt.editor.readOnly )\r
+                       return null;\r
+\r
                var editor = evt.editor,\r
                        elementPath = evt.data.path,\r
                        list = elementPath && elementPath.contains( listNodeNames ),\r
@@ -77,7 +80,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
        function isListItem( node )\r
        {\r
-               return node.type = CKEDITOR.NODE_ELEMENT && node.is( 'li' );\r
+               return node.type == CKEDITOR.NODE_ELEMENT && node.is( 'li' );\r
        }\r
 \r
        indentCommand.prototype = {\r