@wangeditor-next/editor 5.7.3 → 5.7.5

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.
@@ -47,6 +47,7 @@ declare const _default: {
47
47
  delete: string;
48
48
  edit: string;
49
49
  editSize: string;
50
+ preview: string;
50
51
  viewLink: string;
51
52
  src: string;
52
53
  desc: string;
@@ -47,6 +47,7 @@ declare const _default: {
47
47
  delete: string;
48
48
  edit: string;
49
49
  editSize: string;
50
+ preview: string;
50
51
  viewLink: string;
51
52
  src: string;
52
53
  desc: string;
@@ -4,9 +4,17 @@
4
4
  */
5
5
  import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
6
  import { Text } from 'slate';
7
+ type BlockTypeForFormatPainter = 'header1' | 'header2' | 'header3' | 'header4' | 'header5' | 'header6' | 'blockquote' | 'list-item' | 'todo';
8
+ type OrderedListTypeForFormatPainter = '1' | 'a' | 'A' | 'i' | 'I';
9
+ interface BlockStyleForFormatPainter {
10
+ type: BlockTypeForFormatPainter;
11
+ ordered?: boolean;
12
+ orderType?: OrderedListTypeForFormatPainter;
13
+ }
7
14
  interface FormatPaintAttributes {
8
15
  isSelect: boolean;
9
16
  formatStyle: Omit<Text, 'text'> | null;
17
+ formatBlockStyle: BlockStyleForFormatPainter | null;
10
18
  }
11
19
  declare class FormatPainter implements IButtonMenu {
12
20
  title: string;
@@ -16,6 +24,13 @@ declare class FormatPainter implements IButtonMenu {
16
24
  getValue(_editor: IDomEditor): string | boolean;
17
25
  isActive(_editor: IDomEditor): boolean;
18
26
  isDisabled(_editor: IDomEditor): boolean;
27
+ private isSourceBlockType;
28
+ private isTargetBlockType;
29
+ private getTopLevelSelectedBlocks;
30
+ private normalizeListOrderType;
31
+ private getSelectedBlockStyle;
32
+ private unsetListAttrs;
33
+ private applyBlockStyle;
19
34
  setFormatHtml(editor: IDomEditor): void;
20
35
  exec(editor: IDomEditor): void;
21
36
  }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description preview image menu
3
+ */
4
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
5
+ declare class PreviewImage implements IButtonMenu {
6
+ readonly title: string;
7
+ readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z\" p-id=\"10909\"></path><path d=\"M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z\" p-id=\"10910\"></path><path d=\"M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z\"></path></svg>";
8
+ readonly tag = "button";
9
+ getValue(editor: IDomEditor): string | boolean;
10
+ isActive(_editor: IDomEditor): boolean;
11
+ isDisabled(editor: IDomEditor): boolean;
12
+ exec(editor: IDomEditor, value: string | boolean): void;
13
+ }
14
+ export default PreviewImage;
@@ -6,6 +6,7 @@ import DeleteImage from './DeleteImage';
6
6
  import EditImage from './EditImage';
7
7
  import EditorImageSizeMenu from './EditImageSizeMenu';
8
8
  import InsertImage from './InsertImage';
9
+ import PreviewImage from './PreviewImage';
9
10
  import ViewImageLink from './ViewImageLink';
10
11
  import ImageWidth30 from './Width30';
11
12
  import ImageWidth50 from './Width50';
@@ -38,6 +39,10 @@ export declare const viewImageLinkMenuConf: {
38
39
  key: string;
39
40
  factory(): ViewImageLink;
40
41
  };
42
+ export declare const previewImageMenuConf: {
43
+ key: string;
44
+ factory(): PreviewImage;
45
+ };
41
46
  export declare const imageWidth30MenuConf: {
42
47
  key: string;
43
48
  factory(): ImageWidth30;
@@ -95,6 +95,9 @@ interface IInsertTableConfig {
95
95
  selected: boolean;
96
96
  };
97
97
  }
98
+ interface IInsertTableColConfig {
99
+ insertPosition: 'before' | 'after';
100
+ }
98
101
  interface ILinkConfig {
99
102
  checkLink: (text: string, url: string) => string | boolean | undefined;
100
103
  parseLinkUrl: (url: string) => string;
@@ -138,6 +141,7 @@ export interface IMenuConfig {
138
141
  insertImage: IInsertImageConfig;
139
142
  deleteImage: ISingleMenuConfig;
140
143
  editImage: IEditImageConfig;
144
+ previewImage: ISingleMenuConfig;
141
145
  viewImageLink: ISingleMenuConfig;
142
146
  imageWidth30: ISingleMenuConfig;
143
147
  imageWidth50: ISingleMenuConfig;
@@ -166,11 +170,12 @@ export interface IMenuConfig {
166
170
  enter: ISingleMenuConfig;
167
171
  bulletedList: ISingleMenuConfig;
168
172
  numberedList: ISingleMenuConfig;
173
+ numberedListLowerAlpha: ISingleMenuConfig;
169
174
  insertTable: ISingleMenuConfig;
170
175
  deleteTable: ISingleMenuConfig;
171
176
  insertTableRow: IInsertTableConfig;
172
177
  deleteTableRow: ISingleMenuConfig;
173
- insertTableCol: ISingleMenuConfig;
178
+ insertTableCol: IInsertTableColConfig;
174
179
  deleteTableCol: ISingleMenuConfig;
175
180
  tableHeader: ISingleMenuConfig;
176
181
  tableFullWidth: ISingleMenuConfig;