feat: tab for 4 spaces

This commit is contained in:
Lucas.Xu 2022-09-26 16:55:32 +08:00
parent ec97735e94
commit 2d32e02dba

View File

@ -16,6 +16,9 @@ ShortcutEventHandler tabHandler = (editorState, event) {
if (textNode.subtype != BuiltInAttributeKey.bulletedList ||
previous == null ||
previous.subtype != BuiltInAttributeKey.bulletedList) {
TransactionBuilder(editorState)
..insertText(textNode, selection.end.offset, ' ' * 4)
..commit();
return KeyEventResult.handled;
}