Open saulyz opened 2 days ago
Thanks for raising this concern, @saulyz 🙂 As you say, the problem comes because the formatting modifies the content
attribute and bindings override that. It could theoretically be solved by applying the HTML tags to the connected source, but I think that could cause unexpected behaviors. Maybe a mechanism to apply formatting to the whole source value could be explored.
On another note, I also believe Bits/Dynamic tokens could help here. They connect pieces of HTML instead of block attributes, so I can see that working in this use case.
What problem does this address?
Block with the bindings cannot be formatted. When the block has binding - the formatting controls in the
BlockControls
Toolbars are not shown. I understand that this is a complication. The formatting usually changescontent
attribute and the formatting state is saved in thecontent
(examples: 1) the addition of<strong>
tags, the wrapping text with<span class="my-custom-format">
. When we apply bindings thecontent
is being overriden and the formatting info is lost.What is your proposed solution?
"Additional CSS class" field and related attribute theoretically could be a saver, but it it is very limited and cannot fulfil the formatting of the content part. Maybe additional attribute fields inside "metadata" could pass the formatting info?
The test case is with translation shortcode. The formatting within the paragraph applies to inner elements: span, strong, etc..