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

Adds placeholders to AttributedText (Resolves #2440) #2445

Merged
merged 5 commits into from
Dec 9, 2024

Conversation

matthew-carroll
Copy link
Contributor

Adds placeholders to AttributedText (Resolves #2440)

We want to display inline widgets in SuperEditor. This requires a way to represent the existence of such widgets within the text model, which is AttributedText.

This PR adds placeholders to AttributedText. A placeholder is an Object that takes up the space of a single character. This spacing allows for text positions before and after the placeholder, but not within the placeholder.

Each placeholder is represented by some kind of Object. We currently don't place any restriction on what that is. Mapping from placeholders to widgets is handled by the visual system.

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

attributed_text/lib/src/attributed_text.dart Show resolved Hide resolved
@matthew-carroll matthew-carroll merged commit c70d9d2 into main Dec 9, 2024
13 of 14 checks passed
@matthew-carroll matthew-carroll deleted the 2440_attributed-text-placeholders branch December 9, 2024 18:31
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.

[AttributedText] - Add single-character placeholders
2 participants