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
  }
@@ -1096,7 +1088,6 @@ class ElHeaderAndFooterComponent {
1096
1088
  if (editor) {
1097
1089
  const existingTable = editor.querySelector('table');
1098
1090
  if (existingTable) {
1099
- console.log('A table already exists. No new table will be added.');
1100
1091
  return; // Exit if a table is already present
1101
1092
  }
1102
1093
  // Create the table HTML
@@ -1131,23 +1122,17 @@ class ElHeaderAndFooterComponent {
1131
1122
  // const editor = document.getElementById(this.editorId);
1132
1123
  // if (editor) {
1133
1124
  // const table = editor.querySelector('table'); // Find the first table inside the editor
1134
- // console.log('table = ', table);
1135
1125
  // if (table) {
1136
1126
  // const cells = table.querySelectorAll('td'); // Select all table cells
1137
1127
  // cells.forEach((cell) => {
1138
1128
  // cell.style.border = 'none'; // Remove the border by setting it to 'none'
1139
1129
  // });
1140
- // console.log('Table borders removed');
1141
1130
  // // Convert the table element back to HTML string
1142
1131
  // const tableHTML = table.outerHTML;
1143
1132
  // // Insert the updated HTML into the editor
1144
1133
  // editor.focus();
1145
1134
  // document.execCommand('insertHTML', false, tableHTML); // Pass the HTML string, not the element
1146
- // } else {
1147
- // console.log('No table found to remove borders');
1148
- // }
1149
- // } else {
1150
- // console.log('Editor not found');
1135
+ // }
1151
1136
  // }
1152
1137
  // }
1153
1138
  toggleTableBorders() {
@@ -1166,7 +1151,6 @@ class ElHeaderAndFooterComponent {
1166
1151
  });
1167
1152
  const existingTable = editor.querySelector('table');
1168
1153
  if (existingTable) {
1169
- console.log('A table already exists. No new table will be added.');
1170
1154
  // return; // Exit if a table is already present
1171
1155
  }
1172
1156
  // Toggle borders
@@ -1176,7 +1160,6 @@ class ElHeaderAndFooterComponent {
1176
1160
  cell.style.border = 'none'; // Set border to 'none'
1177
1161
  });
1178
1162
  this.isTableBordered = false;
1179
- console.log('Table borders removed');
1180
1163
  }
1181
1164
  else {
1182
1165
  // Add borders
@@ -1184,15 +1167,8 @@ class ElHeaderAndFooterComponent {
1184
1167
  cell.style.border = '2px solid ' + this.themeModeClrBorderForTable(); // Add a default border style
1185
1168
  });
1186
1169
  this.isTableBordered = true;
1187
- console.log('Table borders added');
1188
1170
  }
1189
1171
  }
1190
- else {
1191
- console.log('No table found to toggle borders');
1192
- }
1193
- }
1194
- else {
1195
- console.log('Editor not found');
1196
1172
  }
1197
1173
  }
1198
1174
  themeMode() {