Skip to content

Commit f7a5c5c

Browse files
jeslynbokemister85
andauthored
Update modules/ROOT/pages/custom-toggle-toolbar-button.adoc
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
1 parent b86bc22 commit f7a5c5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/ROOT/pages/custom-toggle-toolbar-button.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The example above adds two custom *strikethrough* toggle buttons. Both buttons u
4848

4949
The first (`+customStrikethrough+`) button applies and removes strikethrough formatting. Its state toggles upon click using `+api.setActive(!api.isActive())+`. However, this button does not reflect whether the selected content has strikethrough formatting which is its expected behavior. Moving the cursor into content with strikethrough formatting does not activate the button, and moving it out does not deactivate it.
5050

51-
=== State-synced toggle: automatic state updates
51+
=== State-synced toggle: automatic state updates
5252

5353
The second button (`+customToggleStrikethrough+`) addresses this by using xref:apis/tinymce.formatter.adoc#formatChanged[`+editor.formatter.formatChanged+`] in its `+onSetup+` callback to monitor the formatting state of the current selection.
5454

0 commit comments

Comments
 (0)