It seems that the event handler for informing that there has been a change to state does not occur without a specific callback.
MarkdownStylesAtSelections is almost never updated:
<CodeMirror6Wrapper Placeholder=""
@bind-Doc="@Model.Doc"
Language="@CodeMirrorLanguage.Markdown"
AutoFormatMarkdown="true"
Width="100%">
<ContentBefore Context="c">
@string.Join(",", c.State.MarkdownStylesAtSelections ?? [])
</ContentBefore>
</CodeMirror6Wrapper>
MarkdownStylesAtSelections is updated instantly:
<CodeMirror6Wrapper Placeholder=""
@bind-Doc="@Model.Doc"
Language="@CodeMirrorLanguage.Markdown"
AutoFormatMarkdown="true"
MarkdownStylesAtSelectionsChanged="@(styles => {})"
Width="100%">
<ContentBefore Context="c">
@string.Join(",", c.State.MarkdownStylesAtSelections ?? [])
</ContentBefore>
</CodeMirror6Wrapper>
It seems that the event handler for informing that there has been a change to state does not occur without a specific callback.
MarkdownStylesAtSelections is almost never updated:
MarkdownStylesAtSelections is updated instantly: