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;
}
Command Description Returns
toggleStrikethrough Toggle strikethrough mark on selection boolean
editor.executeCommand('toggleStrikethrough');
Shortcut Action
Ctrl+Shift+X / Cmd+Shift+X Toggle strikethrough
Mark HTML Tag Rank
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.