@innovastudio/contentbox 1.2.11 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
@@ -40,7 +40,7 @@
40
40
  "webpack-dev-server": "^4.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@innovastudio/contentbuilder": "^1.1.13",
43
+ "@innovastudio/contentbuilder": "^1.1.14",
44
44
  "axios": "^0.21.4",
45
45
  "cors": "^2.8.5",
46
46
  "express": "^4.17.1",
@@ -79442,35 +79442,35 @@ class ContentBuilder {
79442
79442
  }
79443
79443
 
79444
79444
  contentword.innerHTML = sPastedText;
79445
-
79446
- if (this.opts.paste === 'html') {
79447
- //with styles
79448
- let elms = contentword.querySelectorAll('*');
79449
- Array.prototype.forEach.call(elms, elm => {
79450
- for (let n = 0; n < elm.attributes.length; n++) {
79451
- if (elm.attributes[n].name !== 'style') elm.removeAttribute(elm.attributes[n].name);
79452
- }
79453
- });
79454
- } else {
79455
- //html-without-styles (default)
79456
- const removeAttributes = element => {
79457
- while (element.attributes.length > 0) {
79458
- element.removeAttribute(element.attributes[0].name);
79459
- }
79460
- };
79461
-
79462
- let elms = contentword.querySelectorAll('*');
79463
- Array.prototype.forEach.call(elms, elm => {
79464
- removeAttributes(elm);
79465
- });
79445
+ /*
79446
+ // remove attributes
79447
+ if(this.opts.paste === 'html'){//with styles
79448
+ let elms = contentword.querySelectorAll('*');
79449
+ Array.prototype.forEach.call(elms, (elm) => {
79450
+ for(let n = 0;n<elm.attributes.length;n++) {
79451
+ if(elm.attributes[n].name!=='style') elm.removeAttribute(elm.attributes[n].name);
79452
+ }
79453
+ });
79454
+ } else { //html-without-styles (default)
79455
+
79456
+ const removeAttributes = (element) => {
79457
+ while (element.attributes.length > 0) {
79458
+ element.removeAttribute(element.attributes[0].name);
79459
+ }
79460
+ };
79461
+ let elms = contentword.querySelectorAll('*');
79462
+ Array.prototype.forEach.call(elms, (elm) => {
79463
+ removeAttributes(elm);
79464
+ });
79466
79465
  }
79466
+ */
79467
+
79467
79468
  /*
79468
79469
  Additional Cleanup:
79469
79470
  - Remove p inside li
79470
79471
  - Remove li with white-space: pre
79471
79472
  */
79472
79473
 
79473
-
79474
79474
  let elms = contentword.querySelectorAll('li');
79475
79475
  Array.prototype.forEach.call(elms, elm => {
79476
79476
  elm.style.whiteSpace = '';