suneditor 2.43.10 → 2.43.13
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.js +4 -7
- package/src/options.d.ts +4 -0
- package/src/plugins/modules/_anchor.js +1 -1
package/package.json
CHANGED
package/src/lib/core.js
CHANGED
|
@@ -5102,11 +5102,11 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
5102
5102
|
.replace(this.editorTagsBlacklistRegExp, '');
|
|
5103
5103
|
},
|
|
5104
5104
|
|
|
5105
|
-
_cleanStyle: function (m, v,
|
|
5105
|
+
_cleanStyle: function (m, v, name) {
|
|
5106
5106
|
const sv = m.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/);
|
|
5107
5107
|
if (sv) {
|
|
5108
5108
|
if (!v) v = [];
|
|
5109
|
-
const style = sv[0].replace(/"/g, '').match(this._cleanStyleRegExp[
|
|
5109
|
+
const style = sv[0].replace(/"/g, '').match(this._cleanStyleRegExp[name]);
|
|
5110
5110
|
if (style) {
|
|
5111
5111
|
const allowedStyle = [];
|
|
5112
5112
|
for (let i = 0, len = style.length, r; i < len; i++) {
|
|
@@ -5123,10 +5123,10 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
5123
5123
|
if (!options.plugins.fontSize) continue;
|
|
5124
5124
|
break;
|
|
5125
5125
|
case 'color':
|
|
5126
|
-
if (!options.plugins.fontColor) continue;
|
|
5126
|
+
if (!options.plugins.fontColor || /rgba\(([0-9]+\s*,\s*){3}0\)|windowtext/i.test(c)) continue;
|
|
5127
5127
|
break;
|
|
5128
5128
|
case 'backgroundColor':
|
|
5129
|
-
if (!options.plugins.hiliteColor) continue;
|
|
5129
|
+
if (!options.plugins.hiliteColor || /rgba\(([0-9]+\s*,\s*){3}0\)|windowtext/i.test(c)) continue;
|
|
5130
5130
|
break;
|
|
5131
5131
|
}
|
|
5132
5132
|
|
|
@@ -5845,7 +5845,6 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
5845
5845
|
}
|
|
5846
5846
|
|
|
5847
5847
|
this._initWysiwygArea(reload, _initHTML);
|
|
5848
|
-
this.setDir(options.rtl ? 'rtl' : 'ltr');
|
|
5849
5848
|
},
|
|
5850
5849
|
|
|
5851
5850
|
/**
|
|
@@ -6325,8 +6324,6 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
6325
6324
|
|
|
6326
6325
|
if (!command && !display) return;
|
|
6327
6326
|
if (target.disabled) return;
|
|
6328
|
-
if (!core.isReadOnly && !core.hasFocus) core.nativeFocus();
|
|
6329
|
-
if (!core.isReadOnly && !core._variable.isCodeView) core._editorRange();
|
|
6330
6327
|
|
|
6331
6328
|
core.actionCall(command, display, target);
|
|
6332
6329
|
},
|
package/src/options.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export default {
|
|
|
127
127
|
contextAnchor.newWindowCheck.checked = this.options.linkTargetNewWindow;
|
|
128
128
|
} else if (contextAnchor.linkAnchor) {
|
|
129
129
|
this.context.dialog.updateModal = true;
|
|
130
|
-
const href =
|
|
130
|
+
const href = contextAnchor.linkAnchor.getAttribute('href');
|
|
131
131
|
contextAnchor.linkValue = contextAnchor.preview.textContent = contextAnchor.urlInput.value = anchorPlugin.selfPathBookmark.call(this, href) ? href.substr(href.lastIndexOf('#')) : href;
|
|
132
132
|
contextAnchor.anchorText.value = contextAnchor.linkAnchor.textContent || contextAnchor.linkAnchor.getAttribute('alt');
|
|
133
133
|
contextAnchor.newWindowCheck.checked = (/_blank/i.test(contextAnchor.linkAnchor.target) ? true : false);
|