Skip to content

Conversation

@8lurry
Copy link

@8lurry 8lurry commented Nov 16, 2025

This PR introduces enhanced formatting behavior for ContainerBlot and improves how formatting is applied during blot insertion. These changes ensure better compatibility with nested container structures and allow formats to be propagated and applied more consistently across complex document trees.

Look at the changes contained in the PR on parchment.

Key Improvements

  1. ContainerBlot Formatting Support

Enables ContainerBlot to accept and apply formatting.

Ensures that formats defined on parent blots are properly inherited.

Implementation detail

  1. Collects Formats During Insertion

Ensures format data is preserved and passed appropriately during blot creation.

  1. Post-Insertion Formatting Application

Calls formatAt only after all insertion logic is completed.

Prevents partial formatting application and resolves edge cases involving nested structures. For example when the containers are NOT ready yet and becomes ready through call to optimize method.

  1. Parchment Updates

Adjusts Parchment logic to correctly interpret and apply ContainerBlot-level formats. See the parchment PR detail mentioned above.

Extends format resolution behavior so that container-level formatting is recognized alongside inline and block formats.

Related Issue

This addresses formatting consistency issues similar to those described in:
#4750

Why This Matters

These changes improve correctness and flexibility when working with complex container elements, making formatting behavior more predictable and bringing Quill closer to expected behavior in real-world rich-text editing scenarios.

Testing

Verified formatting propagation during nested container insertion.

Confirmed proper execution order of insertion → formatting.

Ensured backward compatibility with existing blots and custom formats.

Test cases related to this pr depends on the changes reflected on the PR on parchment.

- Collect inherited formats from parent Blots during insertion
- Apply formatting using formatAt after insertion completes
- Update parchment logic to correctly process ContainerBlot formats
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.

1 participant