소스 검색

:art: https://github.com/Vanessa219/vditor/issues/1846

Vanessa 1 개월 전
부모
커밋
fe7e2d6568
3개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      src/js/icons/ant.js
  2. 1 1
      src/js/icons/material.js
  3. 7 2
      types/index.d.ts

+ 1 - 1
src/js/icons/ant.js

@@ -1,4 +1,4 @@
-document.body.insertAdjacentHTML('afterBegin', `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg">
+document.body.insertAdjacentHTML('afterbegin', `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg">
   <defs>
     <symbol id="vditor-icon-comment" viewBox="0 0 32 32">
       <path d="M18.177 12.965c-0.825 0-1.464 0.639-1.464 1.428s0.639 1.428 1.464 1.428c0.754 0 1.393-0.639 1.393-1.428s-0.639-1.428-1.393-1.428zM8.178 12.965c-0.825 0-1.464 0.639-1.464 1.428s0.639 1.428 1.464 1.428c0.754 0 1.393-0.639 1.393-1.428s-0.639-1.428-1.393-1.428z"></path>

+ 1 - 1
src/js/icons/material.js

@@ -1,4 +1,4 @@
-document.body.insertAdjacentHTML('afterBegin', `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg">
+document.body.insertAdjacentHTML('afterbegin', `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg">
   <defs>
     <symbol id="vditor-icon-comment" viewBox="0 0 32 32">
       <path d="M28.8 24.272l-1.872-1.872h-23.728v-19.2h25.6v21.072zM28.8 0h-25.6c-1.76 0-3.2 1.44-3.2 3.2v19.2c0 1.76 1.44 3.2 3.2 3.2h22.4l6.4 6.4v-28.8c0-1.76-1.44-3.2-3.2-3.2z"></path>

+ 7 - 2
types/index.d.ts

@@ -190,6 +190,10 @@ declare class Lute {
 
     public SetVditorMathBlockPreview(enable: boolean): void;
 
+    public SetSub(enable: boolean): void;
+
+    public SetSup(enable: boolean): void;
+
     public PutEmojis(emojis: IObject): void;
 
     public GetEmojis(): IObject;
@@ -378,7 +382,7 @@ interface IUpload {
     /** 请求头设置 */
     headers?: IObject;
     /** 额外请求参数 */
-    extraData?: { [key: string]: string | Blob };
+    extraData?: {[key: string]: string | Blob};
     /** 是否允许多文件上传。默认值:true */
     multiple?: boolean;
     /** 上传字段名。默认值:file[] */
@@ -404,6 +408,7 @@ interface IUpload {
 
     //将dataUrl上传到服务器,并返回获取数据的url
     handleDataUrl?(dataUrl: string): string | Promise<string>;
+
     /** 将图片的 base64 转换为链接 */
     base64ToLink?(responseText: string): string;
 
@@ -815,7 +820,7 @@ interface IVditor {
         toggle(vditor: IVditor, show?: boolean, focus?: boolean): void,
     };
     toolbar?: {
-        elements?: { [key: string]: HTMLElement },
+        elements?: {[key: string]: HTMLElement},
         element?: HTMLElement,
         updateConfig(vditor: IVditor, options: IToolbarConfig): void,
     };