This commit is contained in:
life
2014-06-24 21:14:17 +08:00
parent a0acd31fcf
commit 8e05e433de
5 changed files with 7 additions and 3 deletions

View File

@ -28,9 +28,9 @@ tinymce.PluginManager.add('leanote_code', function(editor, url) {
}
if(!text) {
text = $(node).text();
$(node).replaceWith('<pre class="brush:' + value + '"> '+ text + "</pre>");
$(node).replaceWith('<pre class="brush:' + value + '">'+ text + "</pre>");
} else {
ed.insertContent('<pre class="brush:' + value + '"> ' + text + "</pre>");
ed.insertContent('<pre class="brush:' + value + '">' + text + "</pre>");
}
}
ed.selection.moveToBookmark(everBookmark);