lit indent

This commit is contained in:
lealife
2015-10-20 09:28:03 +08:00
parent 320de8637f
commit 29244c247e
2 changed files with 4 additions and 3 deletions

View File

@ -1429,6 +1429,9 @@ LEA.toggleWriteable = Note.toggleWriteable = function() {
return; return;
} }
Note.readOnly = false;
LEA.readOnly = false;
if(!note.readOnly) { if(!note.readOnly) {
return; return;
} }
@ -1446,8 +1449,6 @@ LEA.toggleWriteable = Note.toggleWriteable = function() {
} }
note.readOnly = false; note.readOnly = false;
Note.readOnly = false;
LEA.readOnly = false;
}; };
Note.getPostUrl = function (note) { Note.getPostUrl = function (note) {

View File

@ -373,7 +373,7 @@ tinymce.PluginManager.add('leanote_code', function(editor, url) {
*/ */
// 如果是在li下的, 就不要控制 // 如果是在li下的, 就不要控制
var node = ed.selection.getNode(); var node = ed.selection.getNode();
if (node && node.nodeName === 'LI') { if (node && (node.nodeName == 'LI' || $(node.closest('li')).length > 0)) {
return true; return true;
} }
ed.insertContent("    "); ed.insertContent("    ");