suneditor 3.0.0-beta.21 → 3.0.0-beta.22
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.
- package/dist/suneditor.min.js +1 -1
- package/package.json +1 -1
- package/src/core/class/component.js +108 -28
- package/src/core/class/html.js +1 -1
- package/src/core/class/selection.js +2 -0
- package/src/core/config/options.js +8 -2
- package/src/core/section/actives.js +1 -1
- package/src/core/section/constructor.js +1 -1
- package/src/plugins/browser/audioGallery.js +9 -5
- package/src/plugins/browser/fileBrowser.js +10 -6
- package/src/plugins/browser/fileGallery.js +9 -5
- package/src/plugins/browser/imageGallery.js +8 -4
- package/src/plugins/browser/videoGallery.js +9 -5
- package/src/plugins/command/exportPDF.js +7 -3
- package/src/plugins/command/fileUpload.js +22 -12
- package/src/plugins/dropdown/align.js +6 -2
- package/src/plugins/dropdown/backgroundColor.js +8 -4
- package/src/plugins/dropdown/font.js +6 -4
- package/src/plugins/dropdown/fontColor.js +8 -4
- package/src/plugins/dropdown/formatBlock.js +6 -2
- package/src/plugins/dropdown/hr.js +7 -3
- package/src/plugins/dropdown/layout.js +6 -2
- package/src/plugins/dropdown/lineHeight.js +6 -2
- package/src/plugins/dropdown/paragraphStyle.js +15 -11
- package/src/plugins/dropdown/table.js +10 -6
- package/src/plugins/dropdown/template.js +6 -2
- package/src/plugins/dropdown/textStyle.js +6 -2
- package/src/plugins/field/mention.js +14 -10
- package/src/plugins/input/fontSize.js +12 -8
- package/src/plugins/modal/audio.js +9 -3
- package/src/plugins/modal/embed.js +9 -3
- package/src/plugins/modal/image.js +13 -18
- package/src/plugins/modal/math.js +2 -2
- package/src/plugins/modal/video.js +8 -6
- package/src/plugins/popup/anchor.js +6 -5
- package/src/typedef.js +11 -0
- package/types/core/class/component.d.ts +28 -4
- package/types/core/config/options.d.ts +15 -3
- package/types/plugins/browser/audioGallery.d.ts +29 -18
- package/types/plugins/browser/fileBrowser.d.ts +38 -27
- package/types/plugins/browser/fileGallery.d.ts +29 -18
- package/types/plugins/browser/imageGallery.d.ts +24 -16
- package/types/plugins/browser/videoGallery.d.ts +29 -18
- package/types/plugins/command/exportPDF.d.ts +17 -10
- package/types/plugins/command/fileUpload.d.ts +64 -27
- package/types/plugins/dropdown/align.d.ts +12 -8
- package/types/plugins/dropdown/backgroundColor.d.ts +28 -18
- package/types/plugins/dropdown/font.d.ts +12 -12
- package/types/plugins/dropdown/fontColor.d.ts +28 -18
- package/types/plugins/dropdown/formatBlock.d.ts +12 -8
- package/types/plugins/dropdown/hr.d.ts +15 -11
- package/types/plugins/dropdown/layout.d.ts +15 -11
- package/types/plugins/dropdown/lineHeight.d.ts +15 -11
- package/types/plugins/dropdown/paragraphStyle.d.ts +31 -27
- package/types/plugins/dropdown/table.d.ts +28 -15
- package/types/plugins/dropdown/template.d.ts +15 -11
- package/types/plugins/dropdown/textStyle.d.ts +19 -11
- package/types/plugins/field/mention.d.ts +58 -34
- package/types/plugins/input/fontSize.d.ts +44 -26
- package/types/plugins/modal/audio.d.ts +14 -0
- package/types/plugins/modal/embed.d.ts +14 -0
- package/types/plugins/modal/image.d.ts +18 -0
- package/types/plugins/modal/video.d.ts +14 -0
- package/types/typedef.d.ts +1 -0
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
export default FileBrowser;
|
|
2
2
|
export type BrowserFile_fileBrowser = import('../../modules/Browser').BrowserFile;
|
|
3
|
+
export type FileBrowserPluginOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* - Direct data without server calls
|
|
6
|
+
*/
|
|
7
|
+
data?:
|
|
8
|
+
| {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
}
|
|
11
|
+
| Array<any>;
|
|
12
|
+
/**
|
|
13
|
+
* - Server request URL
|
|
14
|
+
*/
|
|
15
|
+
url?: string;
|
|
16
|
+
/**
|
|
17
|
+
* - Server request headers
|
|
18
|
+
*/
|
|
19
|
+
headers?: {
|
|
20
|
+
[x: string]: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* - Default thumbnail
|
|
24
|
+
*/
|
|
25
|
+
thumbnail?: string | ((item: BrowserFile_fileBrowser) => string);
|
|
26
|
+
/**
|
|
27
|
+
* - Additional tag names
|
|
28
|
+
*/
|
|
29
|
+
props?: Array<string>;
|
|
30
|
+
};
|
|
3
31
|
/**
|
|
4
32
|
* @typedef {import('../../modules/Browser').BrowserFile} BrowserFile_fileBrowser
|
|
5
33
|
*/
|
|
34
|
+
/**
|
|
35
|
+
* @typedef {Object} FileBrowserPluginOptions
|
|
36
|
+
* @property {Object<string, *>|Array<*>} [data] - Direct data without server calls
|
|
37
|
+
* @property {string} [url] - Server request URL
|
|
38
|
+
* @property {Object<string, string>} [headers] - Server request headers
|
|
39
|
+
* @property {string|((item: BrowserFile_fileBrowser) => string)} [thumbnail] - Default thumbnail
|
|
40
|
+
* @property {Array<string>} [props] - Additional tag names
|
|
41
|
+
*/
|
|
6
42
|
/**
|
|
7
43
|
* @class
|
|
8
44
|
* @extends EditorInjector
|
|
@@ -15,34 +51,9 @@ declare class FileBrowser extends EditorInjector {
|
|
|
15
51
|
/**
|
|
16
52
|
* @constructor
|
|
17
53
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {Object<string, *>|Array<*>=} pluginOptions.data - direct data without server calls
|
|
20
|
-
* @param {string} pluginOptions.url - server request url
|
|
21
|
-
* @param {Object<string, string>=} pluginOptions.headers - server request headers
|
|
22
|
-
* @param {string|((item: BrowserFile_fileBrowser) => string)} pluginOptions.thumbnail - default thumbnail
|
|
23
|
-
* @param {Array<string>} pluginOptions.props - additional tag names
|
|
54
|
+
* @param {FileBrowserPluginOptions} pluginOptions
|
|
24
55
|
*/
|
|
25
|
-
constructor(
|
|
26
|
-
editor: __se__EditorCore,
|
|
27
|
-
pluginOptions: {
|
|
28
|
-
data?:
|
|
29
|
-
| (
|
|
30
|
-
| {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
}
|
|
33
|
-
| Array<any>
|
|
34
|
-
)
|
|
35
|
-
| undefined;
|
|
36
|
-
url: string;
|
|
37
|
-
headers?:
|
|
38
|
-
| {
|
|
39
|
-
[x: string]: string;
|
|
40
|
-
}
|
|
41
|
-
| undefined;
|
|
42
|
-
thumbnail: string | ((item: BrowserFile_fileBrowser) => string);
|
|
43
|
-
props: Array<string>;
|
|
44
|
-
}
|
|
45
|
-
);
|
|
56
|
+
constructor(editor: __se__EditorCore, pluginOptions: FileBrowserPluginOptions);
|
|
46
57
|
title: any;
|
|
47
58
|
icon: string;
|
|
48
59
|
onSelectfunction: (targe: Node) => any;
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
export default FileGallery;
|
|
2
2
|
export type BrowserFile_fileGallery = import('../../modules/Browser').BrowserFile;
|
|
3
|
+
export type FileGalleryPluginOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* - Direct data without server calls
|
|
6
|
+
*/
|
|
7
|
+
data?: Array<BrowserFile_fileGallery>;
|
|
8
|
+
/**
|
|
9
|
+
* - Server request URL
|
|
10
|
+
*/
|
|
11
|
+
url?: string;
|
|
12
|
+
/**
|
|
13
|
+
* - Server request headers
|
|
14
|
+
*/
|
|
15
|
+
headers?: {
|
|
16
|
+
[x: string]: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* - Default thumbnail
|
|
20
|
+
*/
|
|
21
|
+
thumbnail?: string | ((item: BrowserFile_fileGallery) => string);
|
|
22
|
+
};
|
|
3
23
|
/**
|
|
4
24
|
* @typedef {import('../../modules/Browser').BrowserFile} BrowserFile_fileGallery
|
|
5
25
|
*/
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {Object} FileGalleryPluginOptions
|
|
28
|
+
* @property {Array<BrowserFile_fileGallery>} [data] - Direct data without server calls
|
|
29
|
+
* @property {string} [url] - Server request URL
|
|
30
|
+
* @property {Object<string, string>} [headers] - Server request headers
|
|
31
|
+
* @property {string|((item: BrowserFile_fileGallery) => string)} [thumbnail] - Default thumbnail
|
|
32
|
+
*/
|
|
6
33
|
/**
|
|
7
34
|
* @class
|
|
8
35
|
* @extends EditorInjector
|
|
@@ -15,25 +42,9 @@ declare class FileGallery extends EditorInjector {
|
|
|
15
42
|
/**
|
|
16
43
|
* @constructor
|
|
17
44
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {Array<*>=} pluginOptions.data - direct data without server calls
|
|
20
|
-
* @param {string} pluginOptions.url - server request url
|
|
21
|
-
* @param {Object<string, string>=} pluginOptions.headers - server request headers
|
|
22
|
-
* @param {string|((item: BrowserFile_fileGallery) => string)} pluginOptions.thumbnail - default thumbnail
|
|
45
|
+
* @param {FileGalleryPluginOptions} pluginOptions
|
|
23
46
|
*/
|
|
24
|
-
constructor(
|
|
25
|
-
editor: __se__EditorCore,
|
|
26
|
-
pluginOptions: {
|
|
27
|
-
data?: Array<any> | undefined;
|
|
28
|
-
url: string;
|
|
29
|
-
headers?:
|
|
30
|
-
| {
|
|
31
|
-
[x: string]: string;
|
|
32
|
-
}
|
|
33
|
-
| undefined;
|
|
34
|
-
thumbnail: string | ((item: BrowserFile_fileGallery) => string);
|
|
35
|
-
}
|
|
36
|
-
);
|
|
47
|
+
constructor(editor: __se__EditorCore, pluginOptions: FileGalleryPluginOptions);
|
|
37
48
|
title: any;
|
|
38
49
|
icon: string;
|
|
39
50
|
onSelectfunction: (targe: Node) => any;
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
export default ImageGallery;
|
|
2
|
+
export type ImageGalleryPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Direct data without server calls
|
|
5
|
+
*/
|
|
6
|
+
data?: Array<any>;
|
|
7
|
+
/**
|
|
8
|
+
* - Server request URL
|
|
9
|
+
*/
|
|
10
|
+
url?: string;
|
|
11
|
+
/**
|
|
12
|
+
* - Server request headers
|
|
13
|
+
*/
|
|
14
|
+
headers?: {
|
|
15
|
+
[x: string]: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @typedef ImageGalleryPluginOptions
|
|
20
|
+
* @property {Array<*>} [data] - Direct data without server calls
|
|
21
|
+
* @property {string} [url] - Server request URL
|
|
22
|
+
* @property {Object<string, string>} [headers] - Server request headers
|
|
23
|
+
*/
|
|
2
24
|
/**
|
|
3
25
|
* @class
|
|
4
26
|
* @extends EditorInjector
|
|
@@ -11,23 +33,9 @@ declare class ImageGallery extends EditorInjector {
|
|
|
11
33
|
/**
|
|
12
34
|
* @constructor
|
|
13
35
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {Array<*>=} pluginOptions.data - direct data without server calls
|
|
16
|
-
* @param {string=} pluginOptions.url - server request url
|
|
17
|
-
* @param {Object<string, string>=} pluginOptions.headers - server request headers
|
|
36
|
+
* @param {ImageGalleryPluginOptions} pluginOptions
|
|
18
37
|
*/
|
|
19
|
-
constructor(
|
|
20
|
-
editor: __se__EditorCore,
|
|
21
|
-
pluginOptions: {
|
|
22
|
-
data?: Array<any> | undefined;
|
|
23
|
-
url?: string | undefined;
|
|
24
|
-
headers?:
|
|
25
|
-
| {
|
|
26
|
-
[x: string]: string;
|
|
27
|
-
}
|
|
28
|
-
| undefined;
|
|
29
|
-
}
|
|
30
|
-
);
|
|
38
|
+
constructor(editor: __se__EditorCore, pluginOptions: ImageGalleryPluginOptions);
|
|
31
39
|
title: any;
|
|
32
40
|
icon: string;
|
|
33
41
|
onSelectfunction: (targe: Node) => any;
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
export default VideoGallery;
|
|
2
2
|
export type BrowserFile_videoGallery = import('../../modules/Browser').BrowserFile;
|
|
3
|
+
export type VideoGalleryPluginOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* - Direct data without server calls
|
|
6
|
+
*/
|
|
7
|
+
data?: Array<BrowserFile_videoGallery>;
|
|
8
|
+
/**
|
|
9
|
+
* - Server request URL
|
|
10
|
+
*/
|
|
11
|
+
url?: string;
|
|
12
|
+
/**
|
|
13
|
+
* - Server request headers
|
|
14
|
+
*/
|
|
15
|
+
headers?: {
|
|
16
|
+
[x: string]: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* - Default thumbnail
|
|
20
|
+
*/
|
|
21
|
+
thumbnail?: string | ((item: BrowserFile_videoGallery) => string);
|
|
22
|
+
};
|
|
3
23
|
/**
|
|
4
24
|
* @typedef {import('../../modules/Browser').BrowserFile} BrowserFile_videoGallery
|
|
5
25
|
*/
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {Object} VideoGalleryPluginOptions
|
|
28
|
+
* @property {Array<BrowserFile_videoGallery>} [data] - Direct data without server calls
|
|
29
|
+
* @property {string} [url] - Server request URL
|
|
30
|
+
* @property {Object<string, string>} [headers] - Server request headers
|
|
31
|
+
* @property {string|((item: BrowserFile_videoGallery) => string)} [thumbnail] - Default thumbnail
|
|
32
|
+
*/
|
|
6
33
|
/**
|
|
7
34
|
* @class
|
|
8
35
|
* @extends EditorInjector
|
|
@@ -15,25 +42,9 @@ declare class VideoGallery extends EditorInjector {
|
|
|
15
42
|
/**
|
|
16
43
|
* @constructor
|
|
17
44
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {Array<*>=} pluginOptions.data - direct data without server calls
|
|
20
|
-
* @param {string=} pluginOptions.url - server request url
|
|
21
|
-
* @param {Object<string, string>=} pluginOptions.headers - server request headers
|
|
22
|
-
* @param {string|((item: BrowserFile_videoGallery) => string)} pluginOptions.thumbnail - default thumbnail
|
|
45
|
+
* @param {VideoGalleryPluginOptions} pluginOptions
|
|
23
46
|
*/
|
|
24
|
-
constructor(
|
|
25
|
-
editor: __se__EditorCore,
|
|
26
|
-
pluginOptions: {
|
|
27
|
-
data?: Array<any> | undefined;
|
|
28
|
-
url?: string | undefined;
|
|
29
|
-
headers?:
|
|
30
|
-
| {
|
|
31
|
-
[x: string]: string;
|
|
32
|
-
}
|
|
33
|
-
| undefined;
|
|
34
|
-
thumbnail: string | ((item: BrowserFile_videoGallery) => string);
|
|
35
|
-
}
|
|
36
|
-
);
|
|
47
|
+
constructor(editor: __se__EditorCore, pluginOptions: VideoGalleryPluginOptions);
|
|
37
48
|
title: any;
|
|
38
49
|
icon: string;
|
|
39
50
|
onSelectfunction: (targe: Node) => any;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
export default ExportPDF;
|
|
2
|
+
export type ExportPDFPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Server request URL for PDF generation
|
|
5
|
+
*/
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
/**
|
|
8
|
+
* - Name of the generated PDF file
|
|
9
|
+
*/
|
|
10
|
+
fileName?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @typedef ExportPDFPluginOptions
|
|
14
|
+
* @property {string} apiUrl - Server request URL for PDF generation
|
|
15
|
+
* @property {string} [fileName="suneditor-pdf"] - Name of the generated PDF file
|
|
16
|
+
*/
|
|
2
17
|
/**
|
|
3
18
|
* @class
|
|
4
19
|
* @description Export PDF plugin
|
|
@@ -10,17 +25,9 @@ declare class ExportPDF extends EditorInjector {
|
|
|
10
25
|
/**
|
|
11
26
|
* @constructor
|
|
12
27
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {string} pluginOptions.apiUrl - server request url
|
|
15
|
-
* @param {string} pluginOptions.fileName - file name
|
|
28
|
+
* @param {ExportPDFPluginOptions} pluginOptions - plugin options
|
|
16
29
|
*/
|
|
17
|
-
constructor(
|
|
18
|
-
editor: __se__EditorCore,
|
|
19
|
-
pluginOptions: {
|
|
20
|
-
apiUrl: string;
|
|
21
|
-
fileName: string;
|
|
22
|
-
}
|
|
23
|
-
);
|
|
30
|
+
constructor(editor: __se__EditorCore, pluginOptions: ExportPDFPluginOptions);
|
|
24
31
|
title: any;
|
|
25
32
|
icon: string;
|
|
26
33
|
apiUrl: string;
|
|
@@ -1,4 +1,64 @@
|
|
|
1
1
|
export default FileUpload;
|
|
2
|
+
export type FileUploadPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Server request URL for file upload
|
|
5
|
+
*/
|
|
6
|
+
uploadUrl: string;
|
|
7
|
+
/**
|
|
8
|
+
* - Server request headers
|
|
9
|
+
*/
|
|
10
|
+
uploadHeaders?: {
|
|
11
|
+
[x: string]: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* - Total upload size limit in bytes
|
|
15
|
+
*/
|
|
16
|
+
uploadSizeLimit?: string;
|
|
17
|
+
/**
|
|
18
|
+
* - Single file size limit in bytes
|
|
19
|
+
*/
|
|
20
|
+
uploadSingleSizeLimit?: string;
|
|
21
|
+
/**
|
|
22
|
+
* - Allow multiple file uploads
|
|
23
|
+
*/
|
|
24
|
+
allowMultiple?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* - Accepted file formats (e.g., 'image/*, .pdf')
|
|
27
|
+
*/
|
|
28
|
+
acceptedFormats?: string;
|
|
29
|
+
/**
|
|
30
|
+
* - Specify the default form of the file component as 'box' or 'link'
|
|
31
|
+
*/
|
|
32
|
+
as?: string;
|
|
33
|
+
/**
|
|
34
|
+
* - Additional controls to be added to the figure
|
|
35
|
+
*/
|
|
36
|
+
controls?: Array<string>;
|
|
37
|
+
/**
|
|
38
|
+
* - Component insertion behavior for selection and cursor placement. [default: options.get('componentInsertBehavior')]
|
|
39
|
+
* - `auto`: Move cursor to the next line if possible, otherwise select the component.
|
|
40
|
+
* - `select`: Always select the inserted component.
|
|
41
|
+
* - `line`: Move cursor to the next line if possible, or create a new line and move there.
|
|
42
|
+
* - `none`: Do nothing.
|
|
43
|
+
*/
|
|
44
|
+
insertBehavior?: __se__ComponentInsertBehaviorType;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @typedef FileUploadPluginOptions
|
|
48
|
+
* @property {string} uploadUrl - Server request URL for file upload
|
|
49
|
+
* @property {Object<string, string>} [uploadHeaders] - Server request headers
|
|
50
|
+
* @property {string} [uploadSizeLimit] - Total upload size limit in bytes
|
|
51
|
+
* @property {string} [uploadSingleSizeLimit] - Single file size limit in bytes
|
|
52
|
+
* @property {boolean} [allowMultiple=false] - Allow multiple file uploads
|
|
53
|
+
* @property {string} [acceptedFormats="*"] - Accepted file formats (e.g., 'image/*, .pdf')
|
|
54
|
+
* @property {string} [as="box"] - Specify the default form of the file component as 'box' or 'link'
|
|
55
|
+
* @property {Array<string>} [controls] - Additional controls to be added to the figure
|
|
56
|
+
* @property {__se__ComponentInsertBehaviorType} [insertBehavior] - Component insertion behavior for selection and cursor placement. [default: options.get('componentInsertBehavior')]
|
|
57
|
+
* - `auto`: Move cursor to the next line if possible, otherwise select the component.
|
|
58
|
+
* - `select`: Always select the inserted component.
|
|
59
|
+
* - `line`: Move cursor to the next line if possible, or create a new line and move there.
|
|
60
|
+
* - `none`: Do nothing.
|
|
61
|
+
*/
|
|
2
62
|
/**
|
|
3
63
|
* @class
|
|
4
64
|
* @description File upload plugin
|
|
@@ -19,33 +79,9 @@ declare class FileUpload extends EditorInjector {
|
|
|
19
79
|
/**
|
|
20
80
|
* @constructor
|
|
21
81
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
22
|
-
* @param {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* @param {string=} pluginOptions.uploadSizeLimit - upload size limit
|
|
26
|
-
* @param {string=} pluginOptions.uploadSingleSizeLimit - upload single size limit
|
|
27
|
-
* @param {boolean=} pluginOptions.allowMultiple - allow multiple files
|
|
28
|
-
* @param {string=} pluginOptions.acceptedFormats - accepted formats
|
|
29
|
-
* @param {string=} pluginOptions.as - Whether to use the 'Box' or 'Link' conversion button
|
|
30
|
-
* @param {Array<string>} pluginOptions.controls - Additional controls to be added to the figure
|
|
31
|
-
*/
|
|
32
|
-
constructor(
|
|
33
|
-
editor: __se__EditorCore,
|
|
34
|
-
pluginOptions: {
|
|
35
|
-
uploadUrl: string;
|
|
36
|
-
uploadHeaders?:
|
|
37
|
-
| {
|
|
38
|
-
[x: string]: string;
|
|
39
|
-
}
|
|
40
|
-
| undefined;
|
|
41
|
-
uploadSizeLimit?: string | undefined;
|
|
42
|
-
uploadSingleSizeLimit?: string | undefined;
|
|
43
|
-
allowMultiple?: boolean | undefined;
|
|
44
|
-
acceptedFormats?: string | undefined;
|
|
45
|
-
as?: string | undefined;
|
|
46
|
-
controls: Array<string>;
|
|
47
|
-
}
|
|
48
|
-
);
|
|
82
|
+
* @param {FileUploadPluginOptions} pluginOptions - plugin options
|
|
83
|
+
*/
|
|
84
|
+
constructor(editor: __se__EditorCore, pluginOptions: FileUploadPluginOptions);
|
|
49
85
|
title: any;
|
|
50
86
|
icon: string;
|
|
51
87
|
uploadUrl: string;
|
|
@@ -58,6 +94,7 @@ declare class FileUpload extends EditorInjector {
|
|
|
58
94
|
acceptedFormats: string;
|
|
59
95
|
_acceptedCheck: string[];
|
|
60
96
|
as: string;
|
|
97
|
+
insertBehavior: __se__ComponentInsertBehaviorType;
|
|
61
98
|
input: HTMLElement;
|
|
62
99
|
_element: HTMLElement;
|
|
63
100
|
figure: Figure;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export default Align;
|
|
2
|
+
export type AlignPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Align items
|
|
5
|
+
*/
|
|
6
|
+
items?: Array<'right' | 'center' | 'left' | 'justify'>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} AlignPluginOptions
|
|
10
|
+
* @property {Array.<"right"|"center"|"left"|"justify">} [items] - Align items
|
|
11
|
+
*/
|
|
2
12
|
/**
|
|
3
13
|
* @class
|
|
4
14
|
* @description Align plugin
|
|
@@ -9,15 +19,9 @@ declare class Align extends EditorInjector {
|
|
|
9
19
|
static className: string;
|
|
10
20
|
/**
|
|
11
21
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {Array.<"right"|"center"|"left"|"justify">} pluginOptions.items - Align items
|
|
22
|
+
* @param {AlignPluginOptions} pluginOptions - Plugin options
|
|
14
23
|
*/
|
|
15
|
-
constructor(
|
|
16
|
-
editor: __se__EditorCore,
|
|
17
|
-
pluginOptions: {
|
|
18
|
-
items: Array<'right' | 'center' | 'left' | 'justify'>;
|
|
19
|
-
}
|
|
20
|
-
);
|
|
24
|
+
constructor(editor: __se__EditorCore, pluginOptions: AlignPluginOptions);
|
|
21
25
|
title: any;
|
|
22
26
|
icon: string;
|
|
23
27
|
_itemMenu: HTMLUListElement;
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export default BackgroundColor;
|
|
2
|
+
export type BackgroundColorPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Color list
|
|
5
|
+
*/
|
|
6
|
+
items?: Array<
|
|
7
|
+
| string
|
|
8
|
+
| {
|
|
9
|
+
value: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
>;
|
|
13
|
+
/**
|
|
14
|
+
* - Number of colors per line
|
|
15
|
+
*/
|
|
16
|
+
splitNum?: number;
|
|
17
|
+
/**
|
|
18
|
+
* - Disable HEX input
|
|
19
|
+
*/
|
|
20
|
+
disableHEXInput?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {Object} BackgroundColorPluginOptions
|
|
24
|
+
* @property {Array<string|{value: string, name: string}>} [items] - Color list
|
|
25
|
+
* @property {number} [splitNum] - Number of colors per line
|
|
26
|
+
* @property {boolean} [disableHEXInput] - Disable HEX input
|
|
27
|
+
*/
|
|
2
28
|
/**
|
|
3
29
|
* @class
|
|
4
30
|
* @description Text background color plugin
|
|
@@ -10,25 +36,9 @@ declare class BackgroundColor extends EditorInjector {
|
|
|
10
36
|
/**
|
|
11
37
|
* @constructor
|
|
12
38
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {Array<string|{value: string, name: string}>} pluginOptions.items - Color list
|
|
15
|
-
* @param {number} pluginOptions.splitNum - Number of colors per line
|
|
16
|
-
* @param {boolean} pluginOptions.disableHEXInput - Disable HEX input
|
|
39
|
+
* @param {BackgroundColorPluginOptions} pluginOptions - Plugin options
|
|
17
40
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
editor: __se__EditorCore,
|
|
20
|
-
pluginOptions: {
|
|
21
|
-
items: Array<
|
|
22
|
-
| string
|
|
23
|
-
| {
|
|
24
|
-
value: string;
|
|
25
|
-
name: string;
|
|
26
|
-
}
|
|
27
|
-
>;
|
|
28
|
-
splitNum: number;
|
|
29
|
-
disableHEXInput: boolean;
|
|
30
|
-
}
|
|
31
|
-
);
|
|
41
|
+
constructor(editor: __se__EditorCore, pluginOptions: BackgroundColorPluginOptions);
|
|
32
42
|
title: any;
|
|
33
43
|
icon: string;
|
|
34
44
|
colorPicker: ColorPicker;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export default Font;
|
|
2
|
+
export type FontPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Font list
|
|
5
|
+
*/
|
|
6
|
+
items?: Array<string>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} FontPluginOptions
|
|
10
|
+
* @property {Array<string>} [items] - Font list
|
|
11
|
+
*/
|
|
2
12
|
/**
|
|
3
13
|
* @class
|
|
4
14
|
* @description Text font plugin
|
|
@@ -10,19 +20,9 @@ declare class Font extends EditorInjector {
|
|
|
10
20
|
/**
|
|
11
21
|
* @constructor
|
|
12
22
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {Array<string>} pluginOptions.items - Font list
|
|
15
|
-
* @param {number} pluginOptions.splitNum - Number of colors per line
|
|
16
|
-
* @param {boolean} pluginOptions.disableHEXInput - Disable HEX input
|
|
23
|
+
* @param {FontPluginOptions} pluginOptions - plugin options
|
|
17
24
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
editor: __se__EditorCore,
|
|
20
|
-
pluginOptions: {
|
|
21
|
-
items: Array<string>;
|
|
22
|
-
splitNum: number;
|
|
23
|
-
disableHEXInput: boolean;
|
|
24
|
-
}
|
|
25
|
-
);
|
|
25
|
+
constructor(editor: __se__EditorCore, pluginOptions: FontPluginOptions);
|
|
26
26
|
title: any;
|
|
27
27
|
inner: string;
|
|
28
28
|
currentFont: string;
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export default FontColor;
|
|
2
|
+
export type FontColorPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Color list
|
|
5
|
+
*/
|
|
6
|
+
items?: Array<
|
|
7
|
+
| string
|
|
8
|
+
| {
|
|
9
|
+
value: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
>;
|
|
13
|
+
/**
|
|
14
|
+
* - Number of colors per line
|
|
15
|
+
*/
|
|
16
|
+
splitNum?: number;
|
|
17
|
+
/**
|
|
18
|
+
* - Disable HEX input
|
|
19
|
+
*/
|
|
20
|
+
disableHEXInput?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {Object} FontColorPluginOptions
|
|
24
|
+
* @property {Array<string|{value: string, name: string}>} [items] - Color list
|
|
25
|
+
* @property {number} [splitNum] - Number of colors per line
|
|
26
|
+
* @property {boolean} [disableHEXInput] - Disable HEX input
|
|
27
|
+
*/
|
|
2
28
|
/**
|
|
3
29
|
* @class
|
|
4
30
|
* @description Font color plugin
|
|
@@ -10,25 +36,9 @@ declare class FontColor extends EditorInjector {
|
|
|
10
36
|
/**
|
|
11
37
|
* @constructor
|
|
12
38
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {Array<string|{value: string, name: string}>} pluginOptions.items - Color list
|
|
15
|
-
* @param {number} pluginOptions.splitNum - Number of colors per line
|
|
16
|
-
* @param {boolean} pluginOptions.disableHEXInput - Disable HEX input
|
|
39
|
+
* @param {FontColorPluginOptions} pluginOptions - Plugin options
|
|
17
40
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
editor: __se__EditorCore,
|
|
20
|
-
pluginOptions: {
|
|
21
|
-
items: Array<
|
|
22
|
-
| string
|
|
23
|
-
| {
|
|
24
|
-
value: string;
|
|
25
|
-
name: string;
|
|
26
|
-
}
|
|
27
|
-
>;
|
|
28
|
-
splitNum: number;
|
|
29
|
-
disableHEXInput: boolean;
|
|
30
|
-
}
|
|
31
|
-
);
|
|
41
|
+
constructor(editor: __se__EditorCore, pluginOptions: FontColorPluginOptions);
|
|
32
42
|
title: any;
|
|
33
43
|
icon: string;
|
|
34
44
|
colorPicker: ColorPicker;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export default FormatBlock;
|
|
2
|
+
export type FormatBlockPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Format list
|
|
5
|
+
*/
|
|
6
|
+
items?: Array<string>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} FormatBlockPluginOptions
|
|
10
|
+
* @property {Array<string>} [items] - Format list
|
|
11
|
+
*/
|
|
2
12
|
/**
|
|
3
13
|
* @class
|
|
4
14
|
* @description FormatBlock Plugin (P, BLOCKQUOTE, PRE, H1, H2...)
|
|
@@ -10,15 +20,9 @@ declare class FormatBlock extends EditorInjector {
|
|
|
10
20
|
/**
|
|
11
21
|
* @constructor
|
|
12
22
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {Array<string>} pluginOptions.items - Format list
|
|
23
|
+
* @param {FormatBlockPluginOptions} pluginOptions - Plugin options
|
|
15
24
|
*/
|
|
16
|
-
constructor(
|
|
17
|
-
editor: __se__EditorCore,
|
|
18
|
-
pluginOptions: {
|
|
19
|
-
items: Array<string>;
|
|
20
|
-
}
|
|
21
|
-
);
|
|
25
|
+
constructor(editor: __se__EditorCore, pluginOptions: FormatBlockPluginOptions);
|
|
22
26
|
title: any;
|
|
23
27
|
inner: string;
|
|
24
28
|
formatList: NodeListOf<Element>;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export default HR;
|
|
2
|
+
export type HRPluginOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - HR list
|
|
5
|
+
*/
|
|
6
|
+
items?: Array<{
|
|
7
|
+
name: string;
|
|
8
|
+
class: string;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {Object} HRPluginOptions
|
|
13
|
+
* @property {Array<{name: string, class: string}>} [items] - HR list
|
|
14
|
+
*/
|
|
2
15
|
/**
|
|
3
16
|
* @class
|
|
4
17
|
* @description HR Plugin
|
|
@@ -16,18 +29,9 @@ declare class HR extends EditorInjector {
|
|
|
16
29
|
/**
|
|
17
30
|
* @constructor
|
|
18
31
|
* @param {__se__EditorCore} editor - The root editor instance
|
|
19
|
-
* @param {
|
|
20
|
-
* @param {Array<{name: string, class: string}>} pluginOptions.items - HR list
|
|
32
|
+
* @param {HRPluginOptions} pluginOptions - Plugin options
|
|
21
33
|
*/
|
|
22
|
-
constructor(
|
|
23
|
-
editor: __se__EditorCore,
|
|
24
|
-
pluginOptions: {
|
|
25
|
-
items: Array<{
|
|
26
|
-
name: string;
|
|
27
|
-
class: string;
|
|
28
|
-
}>;
|
|
29
|
-
}
|
|
30
|
-
);
|
|
34
|
+
constructor(editor: __se__EditorCore, pluginOptions: HRPluginOptions);
|
|
31
35
|
title: any;
|
|
32
36
|
icon: string;
|
|
33
37
|
list: NodeListOf<HTMLButtonElement>;
|