diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-14 17:06:59 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-14 18:30:40 +0200 |
| commit | 8847db139bef9dd8f9465c31438f16af13593267 (patch) | |
| tree | d192bd396ea74f89cd84aac22d79ef126aec6976 /app/controllers/admin_controller.rb | |
| parent | ffb3c9987c2f820b99e8ad0ad56db8ae0324671c (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 'app/controllers/admin_controller.rb')
0 files changed, 0 insertions, 0 deletions
