Skip to content

Add rich text formatting toolbar to Jetchat input - #1727

Open
srikrishnasakunia wants to merge 1 commit into
mainfrom
sri/jetchat-rich-text-toolbar
Open

srikrishnasakunia wants to merge 1 commit into
mainfrom
sri/jetchat-rich-text-toolbar

Conversation

@srikrishnasakunia

Copy link
Copy Markdown
Contributor

Adds an inline rich-text editor to the message input

Adds an inline rich-text editor to the message input, toggled from a new
text-format button next to the attachment button.

- FormattedTextState / SpanStyleState wrap TextFieldState and manage
  inline styles (bold, italic, underline, strikethrough, large font) via
  an InlineStyle enum, plus a cycling text color.
- Collapsed-selection toggles are held as pending overrides and applied
  to the next inserted text.
- Style coverage is computed as a union of ranges, so overlapping ranges
  are not double-counted; adjacent same-style ranges are coalesced.
- Toolbar and send-button state are derived via derivedStateOf to avoid
  recomposing on every keystroke.
- Draft text and styles survive configuration changes via a Saver that
  delegates to TextFieldState.Saver.
- Sent messages and video captions carry their AnnotatedString; the
  message formatter remaps span offsets through markdown-lite tokens so
  styles stay aligned when delimiters are stripped.

Signed-off-by: srikrishnasakunia <sakuniacoolkrishna636@gmail.com>
@srikrishnasakunia
srikrishnasakunia requested a review from a team as a code owner October 7, 2026 12:57
@kuvandikov

Copy link
Copy Markdown

Hello, please provide feedback on pull request #1707.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants