@innovastudio/contentbuilder 1.1.13 → 1.1.14

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/contentbuilder",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -68932,35 +68932,35 @@ class ContentBuilder {
68932
68932
  }
68933
68933
 
68934
68934
  contentword.innerHTML = sPastedText;
68935
-
68936
- if (this.opts.paste === 'html') {
68937
- //with styles
68938
- let elms = contentword.querySelectorAll('*');
68939
- Array.prototype.forEach.call(elms, elm => {
68940
- for (let n = 0; n < elm.attributes.length; n++) {
68941
- if (elm.attributes[n].name !== 'style') elm.removeAttribute(elm.attributes[n].name);
68942
- }
68943
- });
68944
- } else {
68945
- //html-without-styles (default)
68946
- const removeAttributes = element => {
68947
- while (element.attributes.length > 0) {
68948
- element.removeAttribute(element.attributes[0].name);
68949
- }
68950
- };
68951
-
68952
- let elms = contentword.querySelectorAll('*');
68953
- Array.prototype.forEach.call(elms, elm => {
68954
- removeAttributes(elm);
68955
- });
68935
+ /*
68936
+ // remove attributes
68937
+ if(this.opts.paste === 'html'){//with styles
68938
+ let elms = contentword.querySelectorAll('*');
68939
+ Array.prototype.forEach.call(elms, (elm) => {
68940
+ for(let n = 0;n<elm.attributes.length;n++) {
68941
+ if(elm.attributes[n].name!=='style') elm.removeAttribute(elm.attributes[n].name);
68942
+ }
68943
+ });
68944
+ } else { //html-without-styles (default)
68945
+
68946
+ const removeAttributes = (element) => {
68947
+ while (element.attributes.length > 0) {
68948
+ element.removeAttribute(element.attributes[0].name);
68949
+ }
68950
+ };
68951
+ let elms = contentword.querySelectorAll('*');
68952
+ Array.prototype.forEach.call(elms, (elm) => {
68953
+ removeAttributes(elm);
68954
+ });
68956
68955
  }
68956
+ */
68957
+
68957
68958
  /*
68958
68959
  Additional Cleanup:
68959
68960
  - Remove p inside li
68960
68961
  - Remove li with white-space: pre
68961
68962
  */
68962
68963
 
68963
-
68964
68964
  let elms = contentword.querySelectorAll('li');
68965
68965
  Array.prototype.forEach.call(elms, elm => {
68966
68966
  elm.style.whiteSpace = '';