diff --git a/CHANGELOG.md b/CHANGELOG.md index 421f675..fa979fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,39 @@ # Markdown Editor Changelog +## 2.0.5 + +### Added + +- Support Absolute Path。[#84](https://github.com/shuzijun/markdown-editor/issues/84) + +### Changed + +- Optimize text action menu. +- Upgrade vditor to `3.9.1` + +### Fixed + +- fix [#62](https://github.com/shuzijun/markdown-editor/issues/62) + +### Removed + ## 2.0.4 ### Added + - Open file wait for animation + ### Changed ### Fixed + - fix [#81](https://github.com/shuzijun/markdown-editor/issues/81) - fix [#72](https://github.com/shuzijun/markdown-editor/issues/72) - fix [#65](https://github.com/shuzijun/markdown-editor/issues/65) + ### Removed + - Remove the shortcut key to close the search box by default ## 2.0.2 @@ -22,6 +44,7 @@ ### Changed - fix [#68](https://github.com/shuzijun/markdown-editor/issues/68) + ### Fixed ### Removed @@ -33,6 +56,7 @@ ### Changed - Upgrade vditor to `3.8.17` + ### Fixed ### Removed diff --git a/gradle.properties b/gradle.properties index 9559edd..2cfad19 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ pluginGroup = com.shuzijun.markdown pluginName = markdown-editor -pluginVersion = 2.0.4 +pluginVersion = 2.0.5 pluginSinceBuild = 221.0 pluginUntilBuild = diff --git a/src/main/java/com/shuzijun/markdown/editor/MarkdownHtmlPanel.java b/src/main/java/com/shuzijun/markdown/editor/MarkdownHtmlPanel.java index 6be7e67..8e3af1e 100644 --- a/src/main/java/com/shuzijun/markdown/editor/MarkdownHtmlPanel.java +++ b/src/main/java/com/shuzijun/markdown/editor/MarkdownHtmlPanel.java @@ -1,6 +1,5 @@ package com.shuzijun.markdown.editor; -import com.alibaba.fastjson.JSONObject; import com.intellij.CommonBundle; import com.intellij.ide.*; import com.intellij.ide.actions.searcheverywhere.SearchEverywhereManager; @@ -205,6 +204,7 @@ protected DefaultCefContextMenuHandler createDefaultContextMenuHandler() { @Override public void onBeforeContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model) { if (isFileEditor) { + getCefBrowser().executeJavaScript("jsAddBlur()", getCefBrowser().getURL(), 0); model.clear(); ActionGroup anAction = (ActionGroup) ActionManager.getInstance().getAction("EditorPopupMenu"); ActionPopupMenu actionPopupMenu = ActionManager.getInstance().createActionPopupMenu(ActionPlaces.EDITOR_POPUP, anAction); @@ -302,7 +302,11 @@ public String getInjectScript() { String paste = "function jsPaste(value){\n" + " vditor.updateValue(value);\n" + " }\n"; - return savaTime + copy + cut + paste; + + String blur = "function jsAddBlur(){\n" + + " vditor.vditor.ir.element.addEventListener('blur',(event) => {event.stopImmediatePropagation();}, {capture: true,once: true});\n" + + " }\n"; + return savaTime + copy + cut + paste + blur; } public void browserFind(String txt, boolean forward) {