Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

feat: tab for 4 spaces

Lucas.Xu2d32e02dba11
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/tab_handler.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/tab_handler.dart
index 0eb36fff17..d0d594d41e 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/tab_handler.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/tab_handler.dart
@@ -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;
}