el-header-and-footer 0.0.50 → 0.0.51

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.
@@ -230,12 +230,6 @@ class ElHeaderAndFooterComponent {
230
230
  if (index >= 0) {
231
231
  images[index].setAttribute('src', newSrc);
232
232
  }
233
- else {
234
- console.warn(`Index ${index} is out of bounds. Total images: ${images.length}`);
235
- }
236
- }
237
- else {
238
- console.error('Editor element not found');
239
233
  }
240
234
  }
241
235
  initEditor() {
@@ -315,12 +309,10 @@ class ElHeaderAndFooterComponent {
315
309
  editor.focus();
316
310
  const color = this.bgColor;
317
311
  editor.style.backgroundColor = color ? color : this.themeModeBgClr();
318
- console.log('bg Color => ', editor.style.backgroundColor);
319
312
  // }
320
313
  // if (editor) {
321
314
  const existingTable = editor.querySelector('table');
322
315
  if (existingTable) {
323
- console.log('A table already exists. No new table will be added.');
324
316
  this.toggleTableBorders();
325
317
  // Exit if a table is already present
326
318
  }
@@ -1100,7 +1092,6 @@ class ElHeaderAndFooterComponent {
1100
1092
  if (editor) {
1101
1093
  const existingTable = editor.querySelector('table');
1102
1094
  if (existingTable) {
1103
- console.log('A table already exists. No new table will be added.');
1104
1095
  return; // Exit if a table is already present
1105
1096
  }
1106
1097
  // Create the table HTML
@@ -1135,23 +1126,17 @@ class ElHeaderAndFooterComponent {
1135
1126
  // const editor = document.getElementById(this.editorId);
1136
1127
  // if (editor) {
1137
1128
  // const table = editor.querySelector('table'); // Find the first table inside the editor
1138
- // console.log('table = ', table);
1139
1129
  // if (table) {
1140
1130
  // const cells = table.querySelectorAll('td'); // Select all table cells
1141
1131
  // cells.forEach((cell) => {
1142
1132
  // cell.style.border = 'none'; // Remove the border by setting it to 'none'
1143
1133
  // });
1144
- // console.log('Table borders removed');
1145
1134
  // // Convert the table element back to HTML string
1146
1135
  // const tableHTML = table.outerHTML;
1147
1136
  // // Insert the updated HTML into the editor
1148
1137
  // editor.focus();
1149
1138
  // document.execCommand('insertHTML', false, tableHTML); // Pass the HTML string, not the element
1150
- // } else {
1151
- // console.log('No table found to remove borders');
1152
- // }
1153
- // } else {
1154
- // console.log('Editor not found');
1139
+ // }
1155
1140
  // }
1156
1141
  // }
1157
1142
  toggleTableBorders() {
@@ -1170,7 +1155,6 @@ class ElHeaderAndFooterComponent {
1170
1155
  });
1171
1156
  const existingTable = editor.querySelector('table');
1172
1157
  if (existingTable) {
1173
- console.log('A table already exists. No new table will be added.');
1174
1158
  // return; // Exit if a table is already present
1175
1159
  }
1176
1160
  // Toggle borders
@@ -1180,7 +1164,6 @@ class ElHeaderAndFooterComponent {
1180
1164
  cell.style.border = 'none'; // Set border to 'none'
1181
1165
  });
1182
1166
  this.isTableBordered = false;
1183
- console.log('Table borders removed');
1184
1167
  }
1185
1168
  else {
1186
1169
  // Add borders
@@ -1188,15 +1171,8 @@ class ElHeaderAndFooterComponent {
1188
1171
  cell.style.border = '2px solid ' + this.themeModeClrBorderForTable(); // Add a default border style
1189
1172
  });
1190
1173
  this.isTableBordered = true;
1191
- console.log('Table borders added');
1192
1174
  }
1193
1175
  }
1194
- else {
1195
- console.log('No table found to toggle borders');
1196
- }
1197
- }
1198
- else {
1199
- console.log('Editor not found');
1200
1176
  }
1201
1177
  }
1202
1178
  themeMode() {