summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-14 17:06:59 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-14 18:30:40 +0200
commit8847db139bef9dd8f9465c31438f16af13593267 (patch)
treed192bd396ea74f89cd84aac22d79ef126aec6976 /script
parentffb3c9987c2f820b99e8ad0ad56db8ae0324671c (diff)
Add inline image insertion for page bodies, plus a headline-conflict badge
Custom TinyMCE toolbar button opens a picker scoped to a page's own attached images. Selecting one and a placement (full width, left, right) inserts <a class="glightbox" data-gallery="page-N"> wrapping an <img>, sharing the existing headline-image lightbox gallery. No native TinyMCE image dialog or resize handles -- placement is fixed to the three options via CSS classes only. extended_valid_elements defines a and img explicitly and symmetrically; valid_classes allows the placement classes and glightbox specifically. content_style renders placement inside the editing iframe, since ccc.css doesn't load there. A pre-save pass removes any a.glightbox left without an img, covering in-editor deletion regardless of how it happened. Alt text comes from the asset's name, escaped. A badge marks whichever attached image sits at position 0, since _headline_image.html.erb always renders that position as the page's automatic headline. Shown in the sidebar Images list and in the picker grid.
Diffstat (limited to 'script')
0 files changed, 0 insertions, 0 deletions