Browse Source

:arrow_up:

Liyuan Li 5 years ago
parent
commit
e2c7856d7a
7 changed files with 10 additions and 11 deletions
  1. 4 4
      CHANGELOG.md
  2. 1 1
      demo/static.html
  3. 2 3
      src/index.ts
  4. 0 0
      src/js/lute/lute.min.js
  5. 1 1
      src/ts/ui/initUI.ts
  6. 1 1
      src/ts/util/selection.ts
  7. 1 1
      src/ts/wysiwyg/highlightToolbar.ts

+ 4 - 4
CHANGELOG.md

@@ -49,13 +49,13 @@
 
 * [open issues](https://github.com/Vanessa219/vditor/issues)
 
-### v3.0.8 / 2020-04-0x
+### v3.0.9 / 2020-04-0x
 
+### v3.0.8 / 2020-04-02
+
+* [261](https://github.com/Vanessa219/vditor/issues/261) When link with "" and ctrl+k `修复缺陷`
 * [262](https://github.com/Vanessa219/vditor/issues/262) ctrl+m... delete, and enter `修复缺陷`
 * [260](https://github.com/Vanessa219/vditor/issues/260) Not working typewritermode at code block `修复缺陷`
-
-### v3.0.7 / 2020-04-01
-
 * [250](https://github.com/Vanessa219/vditor/issues/250) 支持配置是否开启 wysiwyg 模式下代码块渲染 `引入特性`
 * [258](https://github.com/Vanessa219/vditor/issues/258) wysiwyg a 元素子导航居右被挤变形 `修复缺陷`
 * [212](https://github.com/Vanessa219/vditor/issues/212) Sync XMLHttpRequest Deprecation message `改进功能`

+ 1 - 1
demo/static.html

@@ -35,7 +35,7 @@
     <meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/dist/images/logo.png"/>
     <meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/dist/images/logo.png"/>
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vditor@latest/dist/index.css"/>
-    <script src="https://cdn.jsdelivr.net/npm/[email protected].4/dist/index.min.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/[email protected].7/dist/index.min.js"></script>
 </head>
 <body>
 <h2><a href="https://hacpai.com/article/1549638745630?r=Vanessa" target="_blank">Doc</a></h2>

+ 2 - 3
src/index.ts

@@ -102,9 +102,8 @@ class Vditor extends VditorMethod {
             this.vditor.upload = new Upload();
         }
 
-        // `http://192.168.2.248:9090/lute.min.js?${new Date().getTime()}`
-        // "'src/js/lute/lute.min.js"'
-        // `${mergedOptions.cdn}/dist/js/lute/lute.min.js`
+        // addScript("'src/js/lute/lute.min.js"', "vditorLuteScript").then(() => {
+        // addScript(`http://192.168.2.248:9090/lute.min.js?${new Date().getTime()}`, "vditorLuteScript").then(() => {
         addScript(`${mergedOptions.cdn}/dist/js/lute/lute.min.js`, "vditorLuteScript").then(() => {
             this.vditor.lute = setLute({
                 autoSpace: this.vditor.options.preview.markdown.autoSpace,

File diff suppressed because it is too large
+ 0 - 0
src/js/lute/lute.min.js


+ 1 - 1
src/ts/ui/initUI.ts

@@ -96,5 +96,5 @@ const afterRender = (vditor: IVditor, contentElement: HTMLElement) => {
             initValue = "";
         }
     }
-    return initValue;
+    return initValue || "";
 };

+ 1 - 1
src/ts/util/selection.ts

@@ -33,7 +33,7 @@ export const getCursorPosition = (editor: HTMLElement) => {
             cursorRect = children[range.startOffset].getClientRects()[0];
         } else if (range.startContainer.childNodes.length > 0) {
             // in table or code block
-            range.selectNode(range.startContainer.childNodes[Math.max(0, range.startOffset - 1)])
+            range.selectNode(range.startContainer.childNodes[Math.max(0, range.startOffset - 1)]);
             cursorRect = range.getClientRects()[0];
             range.collapse(false);
         } else {

+ 1 - 1
src/ts/wysiwyg/highlightToolbar.ts

@@ -526,7 +526,7 @@ export const highlightToolbar = (vditor: IVditor) => {
         } else {
             if (!blockRenderElement) {
                 vditor.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach((itemElement) => {
-                    const previousElement = itemElement.previousElementSibling as HTMLElement
+                    const previousElement = itemElement.previousElementSibling as HTMLElement;
                     previousElement.style.display = "none";
                 });
             }

Some files were not shown because too many files changed in this diff