From cd34fd603c32c3b2c55838f0e4246e9782c0f902 Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Sat, 13 Jun 2026 00:26:35 +0200 Subject: [PATCH] Dev build 2026-06-13 00:26 --- containers/novela/static/editor.js | 10 ++-------- containers/novela/templates/editor.html | 4 ++-- containers/novela/version.py | 2 +- docs/changelog-develop.md | 5 +++++ 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/containers/novela/static/editor.js b/containers/novela/static/editor.js index c532963..9e4d61c 100644 --- a/containers/novela/static/editor.js +++ b/containers/novela/static/editor.js @@ -817,12 +817,6 @@ function vCmd(name) { visualEditor.chain().focus()[name]().run(); updateVisualButtons(); } -function vHeading(level) { - if (mode !== 'visual' || !visualEditor) return; - visualEditor.chain().focus().toggleHeading({ level }).run(); - updateVisualButtons(); -} - function updateVisualButtons() { if (mode !== 'visual' || !visualEditor) return; const set = (id, active) => { @@ -832,8 +826,8 @@ function updateVisualButtons() { set('vb-bold', visualEditor.isActive('bold')); set('vb-italic', visualEditor.isActive('italic')); set('vb-underline', visualEditor.isActive('underline')); - set('vb-h2', visualEditor.isActive('heading', { level: 2 })); - set('vb-h3', visualEditor.isActive('heading', { level: 3 })); + set('vb-sup', visualEditor.isActive('superscript')); + set('vb-sub', visualEditor.isActive('subscript')); set('vb-ul', visualEditor.isActive('bulletList')); set('vb-ol', visualEditor.isActive('orderedList')); set('btn-subheading', visualEditor.isActive('subheading')); diff --git a/containers/novela/templates/editor.html b/containers/novela/templates/editor.html index 704fe83..aae2924 100644 --- a/containers/novela/templates/editor.html +++ b/containers/novela/templates/editor.html @@ -56,8 +56,8 @@ - - + + diff --git a/containers/novela/version.py b/containers/novela/version.py index ce888a5..abee128 100644 --- a/containers/novela/version.py +++ b/containers/novela/version.py @@ -10,7 +10,7 @@ from __future__ import annotations from changelog import CHANGELOG -BUILD = 4 +BUILD = 5 def _release_version() -> str: diff --git a/docs/changelog-develop.md b/docs/changelog-develop.md index c8b4c4a..364daf5 100644 --- a/docs/changelog-develop.md +++ b/docs/changelog-develop.md @@ -1,5 +1,10 @@ # Develop Changelog +## 2026-06-13 — Visual editor: drop H2/H3 buttons, add superscript/subscript + +### Changed +- Replaced the H2 and H3 heading buttons in the visual (WYSIWYG) toolbar with **superscript (x²)** and **subscript (x₂)** buttons. The heading buttons weren't part of the novela-ng editor and aren't used; superscript/subscript were missing. Heading levels remain in the schema so existing headings in other books still round-trip — only the authoring buttons changed. `templates/editor.html` (toolbar buttons), `static/editor.js` (`updateVisualButtons` active-state, removed unused `vHeading`). No bundle rebuild (sup/sub extensions were already bundled). + ## 2026-06-12 — Visual editor: full-width editing column ### Changed