docs: htmlStyle for interactive examples components - #719
Open
hejsztynx wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the visual consistency of the interactive documentation examples by supplying a shared htmlStyle (and a specialized EnrichedText variant) so rendered rich text matches the docs’ light/dark color palette, and adds a note explaining why this extra styling appears in the Code tab.
Changes:
- Added a shared
docs/src/examples/htmlStyle.tsand applied it to all interactiveEnrichedTextInputexamples. - Updated the rendering example to use an
EnrichedText-specificenrichedTextHtmlStyle(with press-state styling for links/mentions). - Added a docs note explaining that the
htmlStyleis only present for visual parity and isn’t part of the minimal “copy/paste” sample.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/examples/TextShortcutsEditor.tsx | Applies shared htmlStyle to the shortcuts editor example. |
| docs/src/examples/TextAlignmentEditor.tsx | Applies shared htmlStyle to the alignment editor example. |
| docs/src/examples/RenderingEditor.tsx | Applies htmlStyle to input and enrichedTextHtmlStyle to rendered output. |
| docs/src/examples/MentionEditor.tsx | Applies shared htmlStyle to the mention editor example. |
| docs/src/examples/ListsEditor.tsx | Applies shared htmlStyle to the lists editor example. |
| docs/src/examples/LinksEditor.tsx | Applies shared htmlStyle to the links editor example. |
| docs/src/examples/ImagesEditor.tsx | Applies shared htmlStyle to the images editor example. |
| docs/src/examples/htmlStyle.ts | Introduces centralized style definitions for interactive docs examples. |
| docs/src/examples/FirstEditor.tsx | Applies shared htmlStyle to the first editor example. |
| docs/src/examples/BasicStylesEditor.tsx | Applies shared htmlStyle to the basic styles editor example. |
| docs/docs/fundamentals/your-first-editor.mdx | Adds a note explaining why htmlStyle appears in the interactive example source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hejsztynx
force-pushed
the
@ksienkiewicz/docs-html-style
branch
from
July 22, 2026 09:41
af4a429 to
c50bf9c
Compare
hejsztynx
changed the base branch from
@ksienkiewicz/docs-colors
to
@ksienkiewicz/docs-guides
July 22, 2026 09:41
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
Provided an
htmlStylefor theEnrichedTextInputandEnrichedTextcomponents in the interactive examples. The internal default values didn't look too well, so thishtmlStyleprovides colorings that match the docs' style both in dark and light mode.That makes the interactive examples' code not directly copiable, as
htmlStyleis not present there to reduce noise. Added a note explaining that in theyour-first-editorsection.