export default function editorInit() { const tablesCells = document.querySelectorAll('.wp-block-table td'); function filterCells(element, stringToParse) { return element.textContent.trim() === stringToParse; } const checkedCells = Array.from(tablesCells).filter((element) => filterCells(element, '((v))')); const crossedCells = Array.from(tablesCells).filter((element) => filterCells(element, '((x))')); checkedCells.forEach((cell) => { cell.innerHTML = `
${mainAppJsDynamicDatas.yes}
`; }); crossedCells.forEach((cell) => { cell.innerHTML = `${mainAppJsDynamicDatas.no}`; }); // tables.forEach((table) => { // const tableCells = contains('td', '((v))'); // console.log(tableRows); // tableRows.forEach((row) => { // console.log(row); // }); // }); }