simple-image icon indicating copy to clipboard operation
simple-image copied to clipboard

A quick way to hide image captions when you don't need them

Open JarisGV opened this issue 1 year ago • 0 comments

1 - Create the code to hide the captions div: .cdx-simple-image__caption:has(.hidden) { display: none; }

2 - Set inlineToolbar to true in the SimpleImage tool: image: { class: SimpleImage, inlineToolbar: true, },

3 - Just use the editorjs-style.js tool to apply the 'hidden' class when clicking on the caption. https://github.com/hata6502/editorjs-style

4 - See it in action:

https://github.com/editor-js/simple-image/assets/19142770/e6ebf8ee-7b4a-4dc0-87a6-4b04721943ab

JarisGV avatar Feb 24 '24 21:02 JarisGV