@innovastudio/contentbuilder 1.3.76 → 1.3.78

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.3.76",
4
+ "version": "1.3.78",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -131,7 +131,9 @@ button:focus-visible {
131
131
  .sortable-ghost * {
132
132
  outline: none !important;
133
133
  }
134
- .sortable-ghost .is-row-tool {
134
+ .sortable-ghost .is-row-tool,
135
+ .sortable-ghost .is-col-tool,
136
+ .sortable-ghost .is-rowadd-tool {
135
137
  display: none !important;
136
138
  }
137
139
 
@@ -144,8 +146,8 @@ button:focus-visible {
144
146
  left: 0;
145
147
  background: rgba(0, 0, 0, 0.03);
146
148
  transform-origin: top left;
147
- left: 5%;
148
- top: -25%;
149
+ left: 10%;
150
+ top: -35%;
149
151
  }
150
152
 
151
153
  #_cbhtml .snippet-item {
@@ -813,15 +815,15 @@ button:focus-visible {
813
815
  #_cbhtml[toolbarfull] .is-elementrte-tool,
814
816
  .is-ui[toolbarfull] .is-rte-tool,
815
817
  .is-ui[toolbarfull] .is-elementrte-tool {
816
- top: 0 !important;
817
- left: 0 !important;
818
+ top: 0;
819
+ left: 0;
818
820
  width: 100vw;
819
821
  align-items: center;
820
- box-shadow: rgba(0, 0, 0, 0.07) -1px 1px 0px 0px !important;
822
+ box-shadow: rgba(0, 0, 0, 0.07) -1px 1px 0px 0px;
821
823
  }
822
824
  #_cbhtml[toolbarfull] .is-rte-pop,
823
825
  .is-ui[toolbarfull] .is-rte-pop {
824
- box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 0px 1px !important;
826
+ box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 0px 1px;
825
827
  }
826
828
  #_cbhtml .is-rte-pop,
827
829
  .is-ui .is-rte-pop {
@@ -66379,6 +66379,41 @@ class Rte {
66379
66379
  let inpZoomSlider;
66380
66380
 
66381
66381
  if (!rteTool) {
66382
+ if (builder.plugins.length > 0) {
66383
+ let allButtons = ['|', 'addsnippet', 'bold', 'italic', 'underline', 'formatting', 'color', 'removeformat', 'align', 'textsettings', 'createlink', 'tags', 'undo', 'redo', 'zoom', 'icon', 'image', 'list', 'font', 'formatpara', 'gridtool', 'html', 'preferences', 'more', 'left', 'center', 'right', 'full'];
66384
+
66385
+ const filterButtons = myArray => {
66386
+ let newArray = myArray;
66387
+ myArray.forEach(item => {
66388
+ item = item.toLowerCase();
66389
+ let result = allButtons.filter(btnName => {
66390
+ return btnName === item;
66391
+ });
66392
+
66393
+ if (result.length === 0) {
66394
+ // a plugin
66395
+ result = builder.plugins.filter(plugin => {
66396
+ // check if plugin registered.
66397
+ return plugin.name === item;
66398
+ });
66399
+
66400
+ if (result.length === 0) {
66401
+ // plugin not registered
66402
+ newArray = newArray.filter(e => e !== item);
66403
+ }
66404
+ }
66405
+ });
66406
+ return newArray;
66407
+ };
66408
+
66409
+ builder.opts.buttons = filterButtons(builder.opts.buttons);
66410
+ builder.opts.buttonsMore = filterButtons(builder.opts.buttonsMore);
66411
+ builder.opts.elementButtons = filterButtons(builder.opts.elementButtons);
66412
+ builder.opts.elementButtonsMore = filterButtons(builder.opts.elementButtonsMore);
66413
+ builder.opts.iconButtons = filterButtons(builder.opts.iconButtons);
66414
+ builder.opts.iconButtonsMore = filterButtons(builder.opts.iconButtonsMore);
66415
+ }
66416
+
66382
66417
  let customtag_button = '';
66383
66418
  var customTagsHtml = '';
66384
66419
 
@@ -68971,25 +69006,42 @@ class Rte {
68971
69006
  }
68972
69007
  }); // Backward compatible
68973
69008
 
68974
- if (this.builder.toolbar === 'topfull') {
68975
- if (window.getComputedStyle(this.rteTool).getPropertyValue('left') !== '0px') {
68976
- this.builderStuff.insertAdjacentHTML('afterbegin', `
68977
- <style>
68978
- [toolbarfull] .is-rte-tool,
68979
- [toolbarfull] .is-elementrte-tool {
68980
- top: 0 !important;
68981
- left: 0 !important;
68982
- width: 100vw;
68983
- align-items: center;
68984
- box-shadow: rgba(0, 0, 0, 0.07) -1px 1px 0px 0px !important;
68985
- }
68986
- [toolbarfull] .is-rte-pop {
68987
- box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 0px 1px !important;
68988
- }
68989
- </style>
68990
- `);
68991
- }
69009
+ this.builderStuff.insertAdjacentHTML('afterbegin', `
69010
+ <style>
69011
+ #_cbhtml[toolbarfull] .is-rte-tool,
69012
+ #_cbhtml[toolbarfull] .is-elementrte-tool {
69013
+ top: 0;
69014
+ left: 0;
69015
+ width: 100vw;
69016
+ align-items: center;
69017
+ box-shadow: rgba(0, 0, 0, 0.07) -1px 1px 0px 0px;
69018
+ }
69019
+ #_cbhtml[toolbarfull] .is-rte-pop {
69020
+ box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 0px 1px;
69021
+ }
69022
+ </style>
69023
+ `);
69024
+ /*
69025
+ if(this.builder.toolbar === 'topfull') {
69026
+ if(window.getComputedStyle(this.rteTool).getPropertyValue('left') !== '0px') {
69027
+ this.builderStuff.insertAdjacentHTML('afterbegin', `
69028
+ <style>
69029
+ #_cbhtml[toolbarfull] .is-rte-tool,
69030
+ #_cbhtml[toolbarfull] .is-elementrte-tool {
69031
+ top: 0;
69032
+ left: 0;
69033
+ width: 100vw;
69034
+ align-items: center;
69035
+ box-shadow: rgba(0, 0, 0, 0.07) -1px 1px 0px 0px;
69036
+ }
69037
+ #_cbhtml[toolbarfull] .is-rte-pop {
69038
+ box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 0px 1px;
69039
+ }
69040
+ </style>
69041
+ `);
69042
+ }
68992
69043
  }
69044
+ */
68993
69045
 
68994
69046
  if (this.builder.toolbarDisplay !== 'auto') {
68995
69047
  this.showDefaultToolbar(); // first time