editor-js / editor-js/simple-image

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

Open
#71 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
69
Forks
66
PR merge metrics
No merged PRs in 30d

Description

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](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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.