Skip to content

Add configuration option to override default text rendering#2470

Merged
EchoEllet merged 2 commits intosingerdmx:masterfrom
tjarvstrand:custom-textspan-rendering
Feb 16, 2025
Merged

Add configuration option to override default text rendering#2470
EchoEllet merged 2 commits intosingerdmx:masterfrom
tjarvstrand:custom-textspan-rendering

Conversation

@tjarvstrand
Copy link
Copy Markdown
Contributor

@tjarvstrand tjarvstrand commented Feb 13, 2025

This will allow fine-grained customization of how text is rendered in the editor.

Description

This PR adds a configuration option that allows overriding how flutter_quill builds spans for text content. This will allow things like adding custom inline elements in the text without modifying the underlying document.

Related Issues

With this change, it will be a lot easier to build things like custom inline comments, mentions etc. on top of flutter_quill.

Related:

Type of Change

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.
  • 🧹 Refactor: Code reorganization, no behavior change.
  • Breaking: Alters existing functionality and requires updates.
  • 🧪 Tests: New or modified tests
  • 📝 Documentation: Updates or additions to documentation.
  • 🗑️ Chore: Routine tasks, or maintenance.
  • Build configuration change: Build/configuration changes.

@tjarvstrand tjarvstrand force-pushed the custom-textspan-rendering branch 2 times, most recently from 5bd8084 to 374c164 Compare February 13, 2025 13:17
@tjarvstrand tjarvstrand force-pushed the custom-textspan-rendering branch from 374c164 to 7cffb03 Compare February 14, 2025 14:26
@EchoEllet EchoEllet requested a review from CatHood0 February 15, 2025 07:10
@tjarvstrand tjarvstrand force-pushed the custom-textspan-rendering branch from 7a9fea2 to c9b16e7 Compare February 15, 2025 09:54
Copy link
Copy Markdown
Collaborator

@CatHood0 CatHood0 left a comment

Choose a reason for hiding this comment

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

LGTM. I didn't see any changes that would cause any new errors, just some things with formatting and the TextSpanBuilder.

Copy link
Copy Markdown
Collaborator

@EchoEllet EchoEllet left a comment

Choose a reason for hiding this comment

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

LGTM.

@tjarvstrand
Copy link
Copy Markdown
Contributor Author

I believe the formatting error may be due to the updated formatting rules in Dart 3.7? It's in quill_localizations.dart which this PR didn't touch.

...just some things with formatting and the TextSpanBuilder.

Was there something I should fix related to TextSpanBuilder?

@EchoEllet EchoEllet merged commit c0e624a into singerdmx:master Feb 16, 2025
6 of 7 checks passed
@EchoEllet
Copy link
Copy Markdown
Collaborator

EchoEllet commented Feb 16, 2025

I believe the formatting error may be due to the updated formatting rules in Dart 3.7

I'm not able to reproduce this formatting issue with Dart 3.7 or 3.6 locally, I have disabled the formatting check in CI for now.

@tjarvstrand
Copy link
Copy Markdown
Contributor Author

Thanks!

@tjarvstrand tjarvstrand mentioned this pull request Feb 16, 2025
1 task
CatHood0 pushed a commit to CatHood0/flutter-quill that referenced this pull request Feb 17, 2025
…x#2470)

* Add configuration option to override default text rendering with a textSpanBuilder
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.

3 participants