Étendre le Markdown du site public

This commit is contained in:
Alexandre NOEL 2026-10-12 10:59:11 +02:00
commit 56a2fddc83
12 changed files with 179 additions and 52 deletions

View file

@ -238,7 +238,7 @@ const enhancePublicEditor = (textarea) => {
textarea.addEventListener('focus', () => { activePublicEditor = textarea; });
const toolbar = document.createElement('div');
toolbar.className = 'btn-list mb-2';
const actions = [['B', '**', '**'], ['I', '*', '*'], ['Titre', '## ', ''], ['Liste', '- ', ''], ['Lien', '[', '](https://)']];
const actions = [['B', '**', '**'], ['I', '*', '*'], ['Titre', '## ', ''], ['Liste', '- ', ''], ['Lien', '[', '](https://)'], [<?= json_encode(t('public_site.markdown_table'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>, '| Colonne 1 | Colonne 2 |\n| --- | --- |\n| Valeur 1 | Valeur 2 |\n', '']];
actions.forEach(([label, before, after]) => {
const button = document.createElement('button');
button.type = 'button';