@wizishop/wizi-block 4.2.24-beta → 4.2.25-beta

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.
@@ -24588,8 +24588,7 @@
24588
24588
  };
24589
24589
  TextEditionTool.prototype.editHTML = function () {
24590
24590
  var content = this.getEditorContent();
24591
- var modal = this.createHTMLEditModal(content);
24592
- document.querySelector('body').appendChild(modal);
24591
+ this.createHTMLEditModal(content);
24593
24592
  };
24594
24593
  TextEditionTool.prototype.createHTMLEditModal = function (content) {
24595
24594
  var container = document.createElement('div');
@@ -24598,11 +24597,6 @@
24598
24597
  modal.classList.add(this.modalClass);
24599
24598
  var editorContainer = document.createElement('div');
24600
24599
  editorContainer.classList.add(this.editorClass);
24601
- var monacoEditor = monaco.editor.create(editorContainer, {
24602
- value: content,
24603
- language: 'html',
24604
- automaticLayout: true,
24605
- });
24606
24600
  codeEditEditor = this.findParentEditor();
24607
24601
  codeEditApi = this.api;
24608
24602
  var buttonContainer = document.createElement('div');
@@ -24611,17 +24605,22 @@
24611
24605
  cancelButton.innerText = editorJSI18nDictionnary.messages.tools.codeEdit['Cancel'];
24612
24606
  saveButton.innerText = editorJSI18nDictionnary.messages.tools.codeEdit['Save'];
24613
24607
  cancelButton.addEventListener('click', closeCodeEditModal, true);
24614
- saveButton.addEventListener('click', function () {
24615
- var content = monacoEditor.getValue();
24616
- saveCodeEditModal(content);
24617
- }, true);
24618
24608
  buttonContainer.appendChild(cancelButton);
24619
- buttonContainer.appendChild(saveButton);
24620
24609
  buttonContainer.classList.add(this.buttonClass);
24621
24610
  modal.appendChild(editorContainer);
24622
24611
  modal.appendChild(buttonContainer);
24623
24612
  container.appendChild(modal);
24624
- return container;
24613
+ document.querySelector('body').appendChild(container);
24614
+ var monacoEditor = monaco.editor.create(editorContainer, {
24615
+ value: content,
24616
+ language: 'html',
24617
+ });
24618
+ saveButton.addEventListener('click', function () {
24619
+ console.log("here");
24620
+ var content = monacoEditor.getValue();
24621
+ saveCodeEditModal(content);
24622
+ }, true);
24623
+ buttonContainer.appendChild(saveButton);
24625
24624
  };
24626
24625
  TextEditionTool.prototype.getSavedEditorContent = function (name) {
24627
24626
  return localStorage.getItem(name);