Repository navigation
feat(editor): add alt text support for media files - #2097
Merged
Merged
Conversation
Add the ability to set and edit alt text on images via the editor's image bubble menu. This improves accessibility and enables better markdown export (e.g. for RAG systems). Changes: - Add an "Alt text" button to the image bubble menu toolbar - Show an inline text input for editing alt text on click - Fix image-view.tsx to use the `alt` attribute instead of `title` Closes docmost#1736 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Member
Contributor
Author
|
As suggested per @Philipinho , including markdown page export output on the side to see alt is correctly taken into account:
|
Philipinho
force-pushed
the
feat/image-alt-text
branch
from
May 20, 2026 15:36
9f80aa2 to
f89c122
Compare
Member
|
Hi @olivierlambert, I decided to revert back to ALT. |
Member
|
The ALT now supports images, videos, and diagram nodes. |
Contributor
Author
|
No worries, fine by me! |
Yundi339
pushed a commit
to Yundi339/docmost
that referenced
this pull request
Jun 18, 2026
* feat(editor): add alt text support for images * feat: extend alt text support to videos and diagrams --------- Co-authored-by: Philipinho <[email protected]> (cherry picked from commit 1c166c4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds image caption support to the editor, as requested in #1736. Following @Philipinho's suggestion, this uses a visible caption below the image instead of a hidden alt text field. The caption text is also used as the
altattribute in HTML/markdown exports.How it works
IconTextCaption) toggles an editable caption field below the imagealtin exports, producingin markdownFiles changed
packages/editor-ext/src/lib/image/image.tscaptionattribute to schema; caption maps toaltin renderHTML; caption input in ResizableNodeView code path withstopEventapps/client/src/features/editor/components/image/image-menu.tsxapps/client/src/features/editor/components/image/image-view.tsxtitle→altattribute bugapps/client/src/features/editor/components/image/image-view.module.cssTest plan
formatCloses #1736
🤖 Generated with Claude Code