el-header-and-footer 0.0.56 → 0.0.57

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.
@@ -474,20 +474,20 @@ class ElHeaderAndFooterComponent {
474
474
  document.execCommand('fontName', false, this.selectedFont);
475
475
  }
476
476
  insertCodeBlock() {
477
- const code = `
478
- <pre style="font-size: 12px;
479
- color: white;
480
- background-color: black;
481
- overflow-x: auto;
482
- margin-bottom: 5px;
483
- margin-top: 5px;
484
- padding: 5px 10px;">
485
- <code style="display: block;
486
- white-space: pre-wrap;
487
- height: auto;
488
- font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
489
- font-size: 14px;" class="language-html">Insert code here...</code>
490
- </pre>
477
+ const code = `
478
+ <pre style="font-size: 12px;
479
+ color: white;
480
+ background-color: black;
481
+ overflow-x: auto;
482
+ margin-bottom: 5px;
483
+ margin-top: 5px;
484
+ padding: 5px 10px;">
485
+ <code style="display: block;
486
+ white-space: pre-wrap;
487
+ height: auto;
488
+ font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
489
+ font-size: 14px;" class="language-html">Insert code here...</code>
490
+ </pre>
491
491
  `;
492
492
  document.execCommand('insertHTML', false, code);
493
493
  }
@@ -525,6 +525,7 @@ class ElHeaderAndFooterComponent {
525
525
  editor.focus();
526
526
  let imageInput = document.getElementById('imageInput');
527
527
  if (imageInput) {
528
+ imageInput.value = "";
528
529
  imageInput.click();
529
530
  }
530
531
  }
@@ -1206,21 +1207,21 @@ class ElHeaderAndFooterComponent {
1206
1207
  return; // Exit if a table is already present
1207
1208
  }
1208
1209
  // Create the table HTML
1209
- let table = `<table style="
1210
- width: 100%;
1211
- border-collapse: collapse;
1212
- table-layout: fixed;
1213
- margin: 0 auto;
1210
+ let table = `<table style="
1211
+ width: 100%;
1212
+ border-collapse: collapse;
1213
+ table-layout: fixed;
1214
+ margin: 0 auto;
1214
1215
  ">`;
1215
1216
  table += `<tr>`; // Set row height
1216
1217
  for (let j = 0; j < cols; j++) {
1217
- table += `<td style="
1218
- border: ${this.themeModeClrVerticalLineForTable()};
1219
- word-wrap: break-word;
1220
- word-break: break-word;
1221
- white-space: normal;
1222
- text-align: left; /* Align text to the left */
1223
- vertical-align: top; /* Align content to the top */
1218
+ table += `<td style="
1219
+ border: ${this.themeModeClrVerticalLineForTable()};
1220
+ word-wrap: break-word;
1221
+ word-break: break-word;
1222
+ white-space: normal;
1223
+ text-align: left; /* Align text to the left */
1224
+ vertical-align: top; /* Align content to the top */
1224
1225
  ">&nbsp;</td>`; // Use non-breaking space to keep the cell content
1225
1226
  }
1226
1227
  table += '</tr>';