轻量编辑器切换完成; writting美化

pasteImage在page.js中完成. 因为wmd-input总要是替换, 所以绑定left-column
This commit is contained in:
life
2015-11-25 13:32:02 +08:00
parent a60eb213d8
commit 165bd277d4
16 changed files with 609 additions and 791 deletions

View File

@@ -232,7 +232,7 @@ var Resize = {
clearInterval(self.resizeMDInterval);
self.resizeMDInterval = setTimeout(function () {
MD.aceEditor && MD.aceEditor.resize();
MD.resize && MD.resize();
}, 50);
}
},
@@ -240,17 +240,16 @@ var Resize = {
// 设置宽度
setMdColumnWidth: function(mdEditorWidth) {
var self = this;
if(mdEditorWidth > 100) {
var allWidth = $('#note').width();
if(mdEditorWidth > 100 && mdEditorWidth < allWidth - 80) {
if(Writting.isWriting()) {
UserInfo.MdEditorWidthForWritting = mdEditorWidth;
} else {
UserInfo.MdEditorWidth = mdEditorWidth;
}
// log(mdEditorWidth)
self.leftColumn.width(mdEditorWidth);
self.rightColumn.css("left", mdEditorWidth);
// self.mdSplitter.css("left", mdEditorWidth);
}
// 这样, scrollPreview 才会到正确的位置
@@ -621,7 +620,7 @@ $(function() {
});
// markdown编辑器paste
$('#wmd-input').on('paste', function(e) {
$('#left-column').on('paste', function(e) {
pasteImage(e);
});
});