Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Apr 20, 2023
2 parents e789cee + 0337638 commit df1741f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/suneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "suneditor",
"version": "2.44.11",
"version": "2.44.12",
"description": "Pure JavaScript based WYSIWYG web editor",
"author": "JiHong.Lee",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core.js
Expand Up @@ -3288,7 +3288,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
if (!isRemoveNode && parentCon === endCon.parentNode && parentCon.nodeName === newInnerNode.nodeName) {
if (util.onlyZeroWidthSpace(startCon.textContent.slice(0, startOff)) && util.onlyZeroWidthSpace(endCon.textContent.slice(endOff))) {
const children = parentCon.childNodes;
let sameTag = false;
let sameTag = true;

for (let i = 0, len = children.length, c, s, e, z; i < len; i++) {
c = children[i];
Expand Down
7 changes: 5 additions & 2 deletions src/lib/util.js
Expand Up @@ -556,14 +556,17 @@ const util = {
*/
copyTagAttributes: function (originEl, copyEl, blacklist) {
if (copyEl.style.cssText) {
originEl.style.cssText += copyEl.style.cssText;
const copyStyles = copyEl.style;
for (let i = 0, len = copyStyles.length; i < len; i++) {
originEl.style[copyStyles[i]] = copyStyles[copyStyles[i]];
}
}

const attrs = copyEl.attributes;
for (let i = 0, len = attrs.length, name; i < len; i++) {
name = attrs[i].name.toLowerCase();
if ((blacklist && blacklist.indexOf(name) > -1) || !attrs[i].value) originEl.removeAttribute(name);
else originEl.setAttribute(attrs[i].name, attrs[i].value);
else if (name !== 'style') originEl.setAttribute(attrs[i].name, attrs[i].value);
}
},

Expand Down
2 changes: 1 addition & 1 deletion test/dev/suneditor_build_test.js
Expand Up @@ -944,7 +944,7 @@ let s2 = window.s2 = suneditor.create(document.getElementById('editor2'), {
// defaultStyle: 'color: red;',
// shortcutsDisable: ['bold', 'underline', 'italic'],
width: '100%',
fontSizeUnit: 'em',
// fontSizeUnit: 'em',
// mode: "inline",
value: `<p>Instead of buying low and selling high like investing genius Warren Buffet once said, your long-term investment strategy can be even easier than that: Buy low, never sell.</p><p>It can be easy to buy low and sell high when it comes to investing, but this is not a long-term strategy. Instead, you should aim to buy assets that will never go down in value, such as stocks or real estate. This will allow you to make a profit over the long term, even if the market goes down.</p><p>“The Millionaire Next Door” reported that the majority of millionaires never sell their assets. Whether it’s stocks, bonds, real estate, or any alternative asset — one thing remains consistent: They don’t ever sell.</p><p>“Well, how do you make money if you never sell off your assets?“</p><p>It should be noted that “buy and never sell” is a bit of an extreme exaggeration. It’s not that these millionaires have never sold an asset, it’s just that they held onto their assets long into the future.</p><p>Here’s a real-world example. Say you were one of the amazingly smart people who bought a box of Base Set Pokemon cards for $80 in 1998 and never opened them. This unopened box of cards consistently sells for anywhere between $16,000 to $40,000</p>`,
buttonList:complexEditor,
Expand Down

0 comments on commit df1741f

Please sign in to comment.