@innovastudio/contentbuilder 1.3.77 → 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.77",
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 {
@@ -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