suneditor 2.44.11 → 2.44.12
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 +1 -1
- package/src/lib/util.js +5 -2
package/package.json
CHANGED
package/src/lib/core.js
CHANGED
|
@@ -3288,7 +3288,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
3288
3288
|
if (!isRemoveNode && parentCon === endCon.parentNode && parentCon.nodeName === newInnerNode.nodeName) {
|
|
3289
3289
|
if (util.onlyZeroWidthSpace(startCon.textContent.slice(0, startOff)) && util.onlyZeroWidthSpace(endCon.textContent.slice(endOff))) {
|
|
3290
3290
|
const children = parentCon.childNodes;
|
|
3291
|
-
let sameTag =
|
|
3291
|
+
let sameTag = true;
|
|
3292
3292
|
|
|
3293
3293
|
for (let i = 0, len = children.length, c, s, e, z; i < len; i++) {
|
|
3294
3294
|
c = children[i];
|
package/src/lib/util.js
CHANGED
|
@@ -556,14 +556,17 @@ const util = {
|
|
|
556
556
|
*/
|
|
557
557
|
copyTagAttributes: function (originEl, copyEl, blacklist) {
|
|
558
558
|
if (copyEl.style.cssText) {
|
|
559
|
-
|
|
559
|
+
const copyStyles = copyEl.style;
|
|
560
|
+
for (let i = 0, len = copyStyles.length; i < len; i++) {
|
|
561
|
+
originEl.style[copyStyles[i]] = copyStyles[copyStyles[i]];
|
|
562
|
+
}
|
|
560
563
|
}
|
|
561
564
|
|
|
562
565
|
const attrs = copyEl.attributes;
|
|
563
566
|
for (let i = 0, len = attrs.length, name; i < len; i++) {
|
|
564
567
|
name = attrs[i].name.toLowerCase();
|
|
565
568
|
if ((blacklist && blacklist.indexOf(name) > -1) || !attrs[i].value) originEl.removeAttribute(name);
|
|
566
|
-
else originEl.setAttribute(attrs[i].name, attrs[i].value);
|
|
569
|
+
else if (name !== 'style') originEl.setAttribute(attrs[i].name, attrs[i].value);
|
|
567
570
|
}
|
|
568
571
|
},
|
|
569
572
|
|