diff --git a/frontend/lesson-editor.html b/frontend/lesson-editor.html index c6fb6a0..920fb65 100644 --- a/frontend/lesson-editor.html +++ b/frontend/lesson-editor.html @@ -3110,8 +3110,8 @@ function renderPreview() { const container = document.getElementById('blocks-container'); container.innerHTML = blocks.map(b => renderPreviewBlock(b)).join(''); - // KaTeX - container.querySelectorAll('.pv-formula').forEach(el => renderKatexIn(el)); + // KaTeX (формула-блоки + формулы внутри ячеек таблиц) + container.querySelectorAll('.pv-formula, .pv-table').forEach(el => renderKatexIn(el)); // Highlight.js if (window.hljs) { container.querySelectorAll('pre code').forEach(el => hljs.highlightElement(el)); @@ -3153,7 +3153,7 @@ case 'table': { const rows = Array.isArray(d.rows) ? d.rows : []; const hasH = d.headers !== false; - let html = '
'; + let html = '
'; rows.forEach((r, ri) => { html += ''; r.forEach(c => { const t = (ri===0&&hasH)?'th':'td'; html += `<${t}>${esc(String(c||''))}`; });