diff --git a/public/js/app/note.js b/public/js/app/note.js index e50d56d..5c7c498 100644 --- a/public/js/app/note.js +++ b/public/js/app/note.js @@ -1429,6 +1429,9 @@ LEA.toggleWriteable = Note.toggleWriteable = function() { return; } + Note.readOnly = false; + LEA.readOnly = false; + if(!note.readOnly) { return; } @@ -1446,8 +1449,6 @@ LEA.toggleWriteable = Note.toggleWriteable = function() { } note.readOnly = false; - Note.readOnly = false; - LEA.readOnly = false; }; Note.getPostUrl = function (note) { diff --git a/public/tinymce/plugins/leanote_code/plugin.js b/public/tinymce/plugins/leanote_code/plugin.js index ea25689..f818d40 100644 --- a/public/tinymce/plugins/leanote_code/plugin.js +++ b/public/tinymce/plugins/leanote_code/plugin.js @@ -373,7 +373,7 @@ tinymce.PluginManager.add('leanote_code', function(editor, url) { */ // 如果是在li下的, 就不要控制 var node = ed.selection.getNode(); - if (node && node.nodeName === 'LI') { + if (node && (node.nodeName == 'LI' || $(node.closest('li')).length > 0)) { return true; } ed.insertContent("    ");