Skip to content

Commit b86bc22

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

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
@@ -44,7 +44,7 @@ liveDemo::custom-toolbar-toggle-button[tab="js"]
4444

4545
The example above adds two custom *strikethrough* toggle buttons. Both buttons use the xref:editor-command-identifiers.adoc[`+mceToggleFormat+`] command to apply and remove strikethrough formatting. This command toggles a specified format on and off, but only works for xref:content-formatting.adoc#formats[formats] already registered with the editor. In this example, `+strikethrough+` is the registered format.
4646

47-
=== Basic togle: manual state management
47+
=== Basic toggle: manual state management
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

0 commit comments

Comments
 (0)