suneditor 2.43.1 → 2.43.2
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 +2 -2
- package/package.json +1 -1
- package/src/lib/core.d.ts +8 -0
- package/src/lib/core.js +9 -4
- package/src/lib/util.d.ts +13 -0
- package/src/lib/util.js +2 -1
package/package.json
CHANGED
package/src/lib/core.d.ts
CHANGED
|
@@ -578,6 +578,14 @@ interface Core {
|
|
|
578
578
|
*/
|
|
579
579
|
getContents(onlyContents: boolean): string;
|
|
580
580
|
|
|
581
|
+
/**
|
|
582
|
+
* @description Gets the current contents with containing parent div(div.sun-editor-editable).
|
|
583
|
+
* <div class="sun-editor-editable">{contents}</div>
|
|
584
|
+
* @param onlyContents Return only the contents of the body without headers when the "fullPage" option is true
|
|
585
|
+
* @returns
|
|
586
|
+
*/
|
|
587
|
+
getFullContents(onlyContents: boolean): string;
|
|
588
|
+
|
|
581
589
|
/**
|
|
582
590
|
* @description Gets the clean HTML code for editor
|
|
583
591
|
* @param html HTML string
|
package/src/lib/core.js
CHANGED
|
@@ -2870,6 +2870,12 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
2870
2870
|
this.history.push(false);
|
|
2871
2871
|
},
|
|
2872
2872
|
|
|
2873
|
+
/**
|
|
2874
|
+
* @description Reset common style of list cell
|
|
2875
|
+
* @param {Element} el List cell element. <li>
|
|
2876
|
+
* @param {Array|null} styleArray Style array
|
|
2877
|
+
* @private
|
|
2878
|
+
*/
|
|
2873
2879
|
_resetCommonListCell: function (el, styleArray) {
|
|
2874
2880
|
if (!util.isListCell(el)) return;
|
|
2875
2881
|
if (!styleArray) styleArray = this._listKebab;
|
|
@@ -2917,7 +2923,6 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
2917
2923
|
* @description If certain styles are applied to all child nodes of the list cell, the style of the list cell is also changed. (bold, color, size)
|
|
2918
2924
|
* @param {Element} el List cell element. <li>
|
|
2919
2925
|
* @param {Element|null} child Variable for recursive call. ("null" on the first call)
|
|
2920
|
-
* @param {Array|null} styleArray Style array
|
|
2921
2926
|
* @private
|
|
2922
2927
|
*/
|
|
2923
2928
|
_setCommonListStyle: function (el, child) {
|
|
@@ -4905,10 +4910,10 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
4905
4910
|
* @description Gets the current contents with containing parent div(div.sun-editor-editable).
|
|
4906
4911
|
* <div class="sun-editor-editable">{contents}</div>
|
|
4907
4912
|
* @param {Boolean} onlyContents Return only the contents of the body without headers when the "fullPage" option is true
|
|
4908
|
-
* @returns {
|
|
4913
|
+
* @returns {String}
|
|
4909
4914
|
*/
|
|
4910
4915
|
getFullContents: function (onlyContents) {
|
|
4911
|
-
return '<div class="sun-editor-editable' + options.rtl ? ' se-rtl' : '' + '">' + this.getContents(onlyContents) + '</div>';
|
|
4916
|
+
return '<div class="sun-editor-editable' + (options.rtl ? ' se-rtl' : '') + '">' + this.getContents(onlyContents) + '</div>';
|
|
4912
4917
|
},
|
|
4913
4918
|
|
|
4914
4919
|
/**
|
|
@@ -5690,7 +5695,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
5690
5695
|
}
|
|
5691
5696
|
},
|
|
5692
5697
|
|
|
5693
|
-
__callResizeFunction(h, resizeObserverEntry) {
|
|
5698
|
+
__callResizeFunction: function (h, resizeObserverEntry) {
|
|
5694
5699
|
h = h === -1 ? resizeObserverEntry.borderBoxSize[0].blockSize : h;
|
|
5695
5700
|
if (this._editorHeight !== h) {
|
|
5696
5701
|
if (typeof functions.onResizeEditor === 'function') functions.onResizeEditor(h, this._editorHeight, core, resizeObserverEntry);
|
package/src/lib/util.d.ts
CHANGED
|
@@ -29,6 +29,19 @@ declare interface util {
|
|
|
29
29
|
*/
|
|
30
30
|
getXMLHttpRequest(): XMLHttpRequest | ActiveXObject;
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* @description Object.values
|
|
34
|
+
* @param obj Object parameter.
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
getValues(obj?: any): any[];
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @description Convert the CamelCase To the KebabCase.
|
|
41
|
+
* @param {String|Array} param [Camel string]
|
|
42
|
+
*/
|
|
43
|
+
camelToKebabCase(param: string | string[]): string | string[],
|
|
44
|
+
|
|
32
45
|
/**
|
|
33
46
|
* @description Create Element node
|
|
34
47
|
* @param elementName Element name
|
package/src/lib/util.js
CHANGED
|
@@ -97,7 +97,7 @@ const util = {
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* @description Object.values
|
|
100
|
-
* @param {Object} obj Object parameter.
|
|
100
|
+
* @param {Object|null} obj Object parameter.
|
|
101
101
|
* @returns {Array}
|
|
102
102
|
*/
|
|
103
103
|
getValues: function (obj) {
|
|
@@ -109,6 +109,7 @@ const util = {
|
|
|
109
109
|
/**
|
|
110
110
|
* @description Convert the CamelCase To the KebabCase.
|
|
111
111
|
* @param {String|Array} param [Camel string]
|
|
112
|
+
* @returns {String|Array}
|
|
112
113
|
*/
|
|
113
114
|
camelToKebabCase: function (param) {
|
|
114
115
|
if (typeof param === 'string') {
|