feat(ui): RichTextEditor + RichText (TipTap), moved from AbstimmBAR — ui 0.4.0 - #5
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ency Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…history-safe sync Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
@basicbar/ui 0.4.0 — shared rich-text editor
Moves AbstimmBAR's TipTap rich-text editor into
@basicbar/uiso every -bar tool can share it. The first consumer is Ausleihbar (virtUOS/ausleihbar#5); AbstimmBAR can switch over in a later PR.What's included
RichTextEditor(TipTap 3) with bold, italic, H2/H3, bulleted and numbered lists, links and images.value,onChange, optionalonUploadImage(file) → Promise<relative URL>,ariaLabel,labelledBy,id.onUploadImagethere is no image button, and pasted or dropped image files are ignored.<img>whosesrcdoesn't start with/media/is dropped. When images are disabled, every pasted<img>is dropped.basicbar_integrations.html_sanitize.clean_html) keeps: underline and strike are disabled, and links carry notarget.RichTextrenders server-sanitized HTML with sensible prose defaults. A callerclassNamereplaces the defaults.TranslatableField: the label gets an id, exposed asRenderInputArgs.labelId, so a custom input such as the editor can usearia-labelledby. This is backward compatible.react-domis now a peer dependency, because@tiptap/reactimports it at runtime. TipTap packages are dependencies at^3.27.2, matching AbstimmBAR.renderInputintegration, the sanitizer contract, and the translation keys the app must provide. The CHANGELOG has an entry for ui 0.4.0.Release
After merging, tag
ui/v0.4.0. The publish workflow builds the tgz and creates a draft release, which needs to be published manually. Ausleihbar's PR switches to the release URL once it's published.Testing
npm run buildsucceeds, anddist/index.d.tsexportsRichTextEditor,RichTextEditorProps,RichText,RichTextPropsandRenderInputArgs(withlabelId).🤖 Generated with Claude Code