mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 23:55:50 +00:00
markdown editor clear undo status when toggle note
This commit is contained in:
@@ -433,6 +433,7 @@ function _setEditorContent(content, isMarkdown, preview, callback) {
|
||||
*/
|
||||
if(MD) {
|
||||
MD.setContent(content);
|
||||
MD.clearUndo();
|
||||
callback && callback();
|
||||
} else {
|
||||
clearIntervalForSetContent = setTimeout(function() {
|
||||
|
@@ -31431,7 +31431,8 @@ define('editor',[
|
||||
function highlight(section) {
|
||||
var text = escape(section.text);
|
||||
|
||||
if(!window.viewerMode) {
|
||||
// MDPureText 不用Prism
|
||||
if(!window.LEAMDPureText) {
|
||||
// log("pre")
|
||||
// log(text);
|
||||
// # lif
|
||||
@@ -33873,7 +33874,15 @@ define('core',[
|
||||
// strings: "Markdown syntax"
|
||||
});
|
||||
|
||||
MD.insertLink2 = pagedownEditor.insertLink;
|
||||
MD.pagedownEditor = pagedownEditor;
|
||||
// 重置undo
|
||||
// 11/12
|
||||
MD.clearUndo = function () {
|
||||
MD.undoMgr.init();
|
||||
MD.pagedownEditor.uiManager.setUndoRedoButtonStates();
|
||||
};
|
||||
|
||||
MD.insertLink2 = pagedownEditor.insertLink;
|
||||
|
||||
// Custom insert link dialog
|
||||
pagedownEditor.hooks.set("insertLinkDialog", function(callback) {
|
||||
|
22
public/md/main.min.js
vendored
22
public/md/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user