mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-18 01:16:56 +00:00
轻量编辑器切换完成; writting美化
pasteImage在page.js中完成. 因为wmd-input总要是替换, 所以绑定left-column
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user