@innovastudio/contentbuilder 1.5.101 → 1.5.102

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.5.101",
4
+ "version": "1.5.102",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -95250,9 +95250,20 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
95250
95250
  onStart: () => {
95251
95251
  this.uo.saveForUndo(); // Even if cancelled, saveForUndo will make sure not to save if there is no change
95252
95252
 
95253
+ // Set all to uneditable
95254
+ const editables = this.doc.querySelectorAll('[contenteditable="true"]');
95255
+ editables.forEach(item => {
95256
+ item.setAttribute('contenteditable', 'none'); // use 'none' (not false) for later rollback (to differentiate from existing contenteditable="false" elements)
95257
+ });
95258
+
95253
95259
  this.elmTool.hide();
95254
95260
  },
95255
95261
  onEnd: () => {
95262
+ // Back to editable
95263
+ const editables = this.doc.querySelectorAll('[contenteditable="none"]');
95264
+ editables.forEach(item => {
95265
+ item.setAttribute('contenteditable', 'true');
95266
+ });
95256
95267
  this.util.checkEmpty(); // for multiple instances check
95257
95268
 
95258
95269
  // if(this.sortableOnPage) this.sortableOnPage.destroy(); // enable drop as section (ContentBox)