make hidden content visible during editing
Permalink
I have an image with a hovering caption. When the caption class is applied on the content block, the caption is hidden. This makes it difficult to edit.
Question: How can i have the caption visible during editing?
Can it be done with css or does it need to done in php?
Question: How can i have the caption visible during editing?
Can it be done with css or does it need to done in php?
On recent cores you can do this entirely in css. When a page is in edit mode, the core adds the class 'ccm-edit-mode' to the <html> element:
Along the lines of:
<html lang="en" class="ccm-toolbar-visible ccm-edit-mode ccm-panel-ready">
Along the lines of:
.whatever-class { display:none; } .ccm-edit-mode .whatever-class { display:block; }
Thank you rge and johnthefish.
For some reason i couldn't make it work yet.
This is probably because of the rather complicated setup within an isotope grid.
I'll keep on working on it.
For some reason i couldn't make it work yet.
This is probably because of the rather complicated setup within an isotope grid.
I'll keep on working on it.
Option 1 - css class
See the answer of JohntheFish
Option 2 - element visibility