suneditor 3.0.0-beta.13 → 3.0.0-beta.14
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/editor.js +2 -1
- package/src/core/section/constructor.js +0 -113
- package/src/core/section/options.js +113 -0
- package/src/suneditor.js +19 -12
- package/types/core/section/constructor.d.ts +3 -16
- package/types/core/section/options.d.ts +227 -38
- package/types/suneditor.d.ts +11 -7
package/types/suneditor.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ declare namespace _default {
|
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* Creates a new instance of the SunEditor
|
|
23
|
-
* @param {Element|Object<string, {target: Element, options: EditorFrameOptions_suneditor}>} target
|
|
23
|
+
* @param {Element|string|Object<string, {target: Element, options: EditorFrameOptions_suneditor}>} target
|
|
24
|
+
* - Element: The direct DOM element to initialize the editor on.
|
|
25
|
+
* - string: A CSS selector string. The corresponding element is selected using `document.querySelector`.
|
|
26
|
+
* - Object: For multi-root setup. Each key maps to a config with `{target, options}`.
|
|
24
27
|
* @param {EditorInitOptions_suneditor} options - Initialization options
|
|
25
28
|
* @param {EditorInitOptions_suneditor} [_init_options] - Optional preset initialization options
|
|
26
29
|
* @returns {Editor} - Instance of the SunEditor
|
|
@@ -29,6 +32,7 @@ declare namespace _default {
|
|
|
29
32
|
function create(
|
|
30
33
|
target:
|
|
31
34
|
| Element
|
|
35
|
+
| string
|
|
32
36
|
| {
|
|
33
37
|
[x: string]: {
|
|
34
38
|
target: Element;
|
|
@@ -42,10 +46,10 @@ declare namespace _default {
|
|
|
42
46
|
export default _default;
|
|
43
47
|
export type EditorFrameOptions_suneditor = import('./core/section/options').EditorFrameOptions;
|
|
44
48
|
export type EditorInitOptions_suneditor = import('./core/section/options').EditorInitOptions;
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
49
|
+
import editorInjector from './editorInjector';
|
|
50
|
+
import plugins from './plugins';
|
|
51
|
+
import modules from './modules';
|
|
52
|
+
import langs from './langs';
|
|
53
|
+
import helper from './helper';
|
|
50
54
|
import Editor from './core/editor';
|
|
51
|
-
export {
|
|
55
|
+
export { editorInjector, plugins, modules, langs, helper };
|