diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 052c6835..314338fb 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -7,10 +7,10 @@ jobs: name: ESlint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache node modules - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} diff --git a/package.json b/package.json index cdc99cf0..954edf83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/image", - "version": "2.10.2", + "version": "2.10.3", "keywords": [ "codex editor", "image", diff --git a/src/index.ts b/src/index.ts index c35f436b..77006067 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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; @@ -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); } }