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';
new StrikethroughPlugin()
interface StrikethroughConfig {
/** Render separator after toolbar item. */
readonly separatorAfter?: boolean;
}
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.