Skip to content

Strikethrough Plugin

The StrikethroughPlugin adds strikethrough text support with a toggle command and keyboard shortcut.

Text formatting with strikethrough

import { StrikethroughPlugin } from '@notectl/core/plugins/strikethrough';
new StrikethroughPlugin()
interface StrikethroughConfig {
/** Custom locale strings. */
readonly locale?: StrikethroughLocale;
}
CommandDescriptionReturns
toggleStrikethroughToggle strikethrough mark on selectionboolean
editor.executeCommand('toggleStrikethrough');
ShortcutAction
Ctrl+Shift+X / Cmd+Shift+XToggle strikethrough
MarkHTML TagRank
strikethrough<s>3

The strikethrough button renders in the toolbar with an isActive check. When the cursor is inside strikethrough text, the button appears highlighted/pressed.