The purpose of this PR is allowing to control whether the typing attributes should be recalculated when deleting backward, this will be handy when we want typing attributes/text format to be fully controlled by other libraries, therefore prevent that Aztec modifies them.
Additionally, there's a comment in the recalculateTypingAttributes function that states the following (reference):
/// Only call this method when sure that the typingAttributes need to be recalculated. Keep in mind that
/// recalculating the typingAttributes in the wrong moment can cause trouble (for example reverting a decision
/// by the user to turn a style off).
If the recalculation only should happen in specific cases, this aligns with the idea of giving control over whether to recalculate the typing attributes through a variable.
To test:
This change shouldn't modify the current behavior when deleting text, so we should only verify that deleting backward works as expected.
Related to Gutenberg PR: https://github.com/WordPress/gutenberg/pull/37676
The purpose of this PR is allowing to control whether the typing attributes should be recalculated when deleting backward, this will be handy when we want typing attributes/text format to be fully controlled by other libraries, therefore prevent that Aztec modifies them.
Additionally, there's a comment in the
recalculateTypingAttributes
function that states the following (reference):If the recalculation only should happen in specific cases, this aligns with the idea of giving control over whether to recalculate the typing attributes through a variable.
To test: This change shouldn't modify the current behavior when deleting text, so we should only verify that deleting backward works as expected.