Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/image",
"version": "2.10.2",
"version": "2.10.3",
"keywords": [
"codex editor",
"image",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default class ImageTool implements BlockTool {
public render(): HTMLDivElement {
if (this.config.features?.caption === true || this.config.features?.caption === undefined || (this.config.features?.caption === 'optional' && this.data.caption)) {
this.isCaptionEnabled = true;
this.ui.applyTune('caption', true);
}

return this.ui.render() as HTMLDivElement;
Expand Down Expand Up @@ -403,6 +404,8 @@ export default class ImageTool implements BlockTool {

if (data.caption) {
this.setTune('caption', true);
} else if (this.config.features?.caption === true) {
this.setTune('caption', true);
}
}

Expand Down
Loading