customSlashCommand function
CharacterShortcutEvent
customSlashCommand(
- List<
SelectionMenuItem> items, { - bool shouldInsertSlash = true,
- bool deleteKeywordsByDefault = false,
- bool singleColumn = true,
- SelectionMenuStyle style = SelectionMenuStyle.light,
- Set<
String> supportSlashMenuNodeTypes = _defaultSupportSlashMenuNodeTypes,
Implementation
CharacterShortcutEvent customSlashCommand(
List<SelectionMenuItem> items, {
bool shouldInsertSlash = true,
bool deleteKeywordsByDefault = false,
bool singleColumn = true,
SelectionMenuStyle style = SelectionMenuStyle.light,
Set<String> supportSlashMenuNodeTypes = _defaultSupportSlashMenuNodeTypes,
}) {
return CharacterShortcutEvent(
key: 'show the slash menu',
character: '/',
handler: (editorState) => _showSlashMenu(
editorState,
items,
shouldInsertSlash: shouldInsertSlash,
deleteKeywordsByDefault: deleteKeywordsByDefault,
singleColumn: singleColumn,
style: style,
supportSlashMenuNodeTypes: supportSlashMenuNodeTypes,
),
);
}