mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-17 16:45:21 +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) {
|
if(MD) {
|
||||||
MD.setContent(content);
|
MD.setContent(content);
|
||||||
|
MD.clearUndo();
|
||||||
callback && callback();
|
callback && callback();
|
||||||
} else {
|
} else {
|
||||||
clearIntervalForSetContent = setTimeout(function() {
|
clearIntervalForSetContent = setTimeout(function() {
|
||||||
|
@@ -31431,7 +31431,8 @@ define('editor',[
|
|||||||
function highlight(section) {
|
function highlight(section) {
|
||||||
var text = escape(section.text);
|
var text = escape(section.text);
|
||||||
|
|
||||||
if(!window.viewerMode) {
|
// MDPureText 不用Prism
|
||||||
|
if(!window.LEAMDPureText) {
|
||||||
// log("pre")
|
// log("pre")
|
||||||
// log(text);
|
// log(text);
|
||||||
// # lif
|
// # lif
|
||||||
@@ -33873,7 +33874,15 @@ define('core',[
|
|||||||
// strings: "Markdown syntax"
|
// 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
|
// Custom insert link dialog
|
||||||
pagedownEditor.hooks.set("insertLinkDialog", function(callback) {
|
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