Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SuperEditor][SuperReader] - Added support for inline widgets (Resolves #2442) #2450

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

matthew-carroll
Copy link
Contributor

@matthew-carroll matthew-carroll commented Dec 10, 2024

[SuperEditor][SuperReader] - Added support for inline widgets (Resolves #2442)

Screen.Recording.2024-12-09.at.3.09.48.PM.mov

How to customize inline widgets:
Similar to the inline text styler, the inline widget builders can be configured on the stylesheet.

final myStylesheet = defaultStylesheet.copyWith(
  inlineWidgetBuilderChain: [
    myBuilder1,
    myBuilder2,
    // etc.
  ],
);

Default inline widget builders:
Currently there are only 2 default inline widget builders. One for network images, and one for asset images.

Changes to uses of AttributedText:
Due to changes in AttributedText to support placeholders, this PR makes the following changes:

  • myText.text.length -> myText.length (because the length of the String no longer matches the length of the AttributedText)
  • myText.text -> myText.toPlainText() (because there's no longer a single possible plain-text representation)

Copy link
Collaborator

@angelosilvestre angelosilvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

[SuperEditor][SuperReader] - Add support for inline images and gifs
2 participants