Browse Source

:rotating_light:

Van 5 years ago
parent
commit
adb24900e8
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/ts/wysiwyg/highlightToolbar.ts
  2. 2 2
      src/ts/wysiwyg/input.ts

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

@@ -109,10 +109,10 @@ export const highlightToolbar = (vditor: IVditor) => {
             indent.setAttribute("aria-label", i18n[vditor.options.lang].indent);
             indent.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n";
             indent.onclick = () => {
-                const cloneRange = getSelection().getRangeAt(0).cloneRange()
+                const cloneRange = getSelection().getRangeAt(0).cloneRange();
                 document.execCommand("indent", false);
                 // fix 空列表缩进光标会飘逸
-                setSelectionFocus(cloneRange)
+                setSelectionFocus(cloneRange);
             };
 
             vditor.wysiwyg.popover.insertAdjacentElement("beforeend", outdent);

+ 2 - 2
src/ts/wysiwyg/input.ts

@@ -3,7 +3,7 @@ import {
     hasClosestByClassName,
     hasClosestByMatchTag,
     hasClosestByTag,
-    hasTopClosestByTag
+    hasTopClosestByTag,
 } from "../util/hasClosest";
 import {log} from "../util/log";
 import {afterRenderEvent} from "./afterRenderEvent";
@@ -21,7 +21,7 @@ export const input = (event: IHTMLInputEvent, vditor: IVditor, range: Range) =>
         topListElement = topOlElement;
     }
     if (topListElement) {
-        blockElement = topListElement
+        blockElement = topListElement;
     }
     if (!blockElement) {
         // 使用顶级块元素,应使用 innerHTML