@wangeditor-next/code-highlight 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -138,6 +138,7 @@ export interface IMenuConfig {
|
|
|
138
138
|
insertImage: IInsertImageConfig;
|
|
139
139
|
deleteImage: ISingleMenuConfig;
|
|
140
140
|
editImage: IEditImageConfig;
|
|
141
|
+
previewImage: ISingleMenuConfig;
|
|
141
142
|
viewImageLink: ISingleMenuConfig;
|
|
142
143
|
imageWidth30: ISingleMenuConfig;
|
|
143
144
|
imageWidth50: ISingleMenuConfig;
|
|
@@ -166,6 +167,7 @@ export interface IMenuConfig {
|
|
|
166
167
|
enter: ISingleMenuConfig;
|
|
167
168
|
bulletedList: ISingleMenuConfig;
|
|
168
169
|
numberedList: ISingleMenuConfig;
|
|
170
|
+
numberedListLowerAlpha: ISingleMenuConfig;
|
|
169
171
|
insertTable: ISingleMenuConfig;
|
|
170
172
|
deleteTable: ISingleMenuConfig;
|
|
171
173
|
insertTableRow: IInsertTableConfig;
|
|
@@ -247,14 +249,20 @@ export interface IEditorConfig {
|
|
|
247
249
|
}
|
|
248
250
|
export interface IInsertKeysConfig {
|
|
249
251
|
index: number;
|
|
250
|
-
keys: string |
|
|
251
|
-
replaceFn?: (config:
|
|
252
|
+
keys: string | IToolbarMenuKey[];
|
|
253
|
+
replaceFn?: (config: IToolbarMenuKey) => IToolbarMenuKey;
|
|
252
254
|
}
|
|
255
|
+
export interface IToolbarMenuItemConf {
|
|
256
|
+
key: string;
|
|
257
|
+
title?: string;
|
|
258
|
+
iconSvg?: string;
|
|
259
|
+
}
|
|
260
|
+
export type IToolbarMenuKey = string | IMenuGroup | IToolbarMenuItemConf;
|
|
253
261
|
/**
|
|
254
262
|
* toolbar config
|
|
255
263
|
*/
|
|
256
264
|
export interface IToolbarConfig {
|
|
257
|
-
toolbarKeys:
|
|
265
|
+
toolbarKeys: IToolbarMenuKey[];
|
|
258
266
|
insertKeys: IInsertKeysConfig | Array<IInsertKeysConfig>;
|
|
259
267
|
excludeKeys: Array<string>;
|
|
260
268
|
modalAppendToBody: boolean;
|
|
@@ -20,6 +20,8 @@ declare class Toolbar {
|
|
|
20
20
|
getConfig(): Partial<IToolbarConfig>;
|
|
21
21
|
private initToolbar;
|
|
22
22
|
private registerItems;
|
|
23
|
+
private isMenuGroup;
|
|
24
|
+
private registerSingleMenuByConf;
|
|
23
25
|
private registerGroup;
|
|
24
26
|
private registerSingleItem;
|
|
25
27
|
private getEditorInstance;
|
|
@@ -2,18 +2,13 @@
|
|
|
2
2
|
* @description vdom 相关方法
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { Dataset, Props, VNode, VNodeStyle } from 'snabbdom';
|
|
6
6
|
export type PatchFn = (oldVnode: VNode | Element, vnode: VNode) => VNode;
|
|
7
7
|
/**
|
|
8
8
|
* 创建 snabbdom patch
|
|
9
9
|
* @returns snabbdom patch 函数
|
|
10
10
|
*/
|
|
11
11
|
export declare function genPatchFn(): PatchFn;
|
|
12
|
-
/**
|
|
13
|
-
* 整理 vnode.data ,将暴露出来的零散属性(如 id className data-xxx)放在 data.props 或 data.dataset
|
|
14
|
-
* @param vnode vnode
|
|
15
|
-
*/
|
|
16
|
-
export declare function normalizeVnodeData(vnode: VNode): void;
|
|
17
12
|
/**
|
|
18
13
|
* 给 vnode 添加 prop
|
|
19
14
|
* @param vnode vnode
|
|
@@ -32,3 +27,8 @@ export declare function addVnodeDataset(vnode: VNode, newDataset: Dataset): void
|
|
|
32
27
|
* @param newStyle { key: val }
|
|
33
28
|
*/
|
|
34
29
|
export declare function addVnodeStyle(vnode: VNode, newStyle: VNodeStyle): void;
|
|
30
|
+
/**
|
|
31
|
+
* 整理 vnode.data ,将暴露出来的零散属性(如 id className data-xxx)放在 data.props 或 data.dataset
|
|
32
|
+
* @param vnode vnode
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeVnodeData(vnode: VNode): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wangeditor-next/code-highlight",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "wangEditor code-highlight module",
|
|
5
5
|
"author": "cycleccc <2991205548@qq.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/wangeditor-next/wangeditor-next/issues"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@wangeditor-next/core": "1.8.
|
|
38
|
+
"@wangeditor-next/core": "1.8.4",
|
|
39
39
|
"dom7": "^3.0.0 || ^4.0.0",
|
|
40
40
|
"slate": "^0.123.0",
|
|
41
41
|
"snabbdom": "^3.6.0"
|