fix: cannot click on links (#3017)

This commit is contained in:
Lucas.Xu
2023-07-18 14:59:41 +07:00
committed by GitHub
parent 1f720efc8a
commit 706a5e784f
16 changed files with 226 additions and 11 deletions

View File

@ -357,6 +357,7 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
outlineItem,
mathEquationItem,
codeBlockItem,
toggleListBlockItem,
emojiMenuItem,
autoGeneratorMenuItem,
];

View File

@ -1,4 +1,6 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
@ -42,6 +44,15 @@ Node toggleListBlockNode({
);
}
// defining the toggle list block menu item
SelectionMenuItem toggleListBlockItem = SelectionMenuItem.node(
name: LocaleKeys.document_plugins_toggleList.tr(),
iconData: Icons.arrow_right,
keywords: ['collapsed list', 'toggle list', 'list'],
nodeBuilder: (editorState) => toggleListBlockNode(),
replace: (_, node) => node.delta?.isEmpty ?? false,
);
class ToggleListBlockComponentBuilder extends BlockComponentBuilder {
ToggleListBlockComponentBuilder({
this.configuration = const BlockComponentConfiguration(),

View File

@ -220,6 +220,12 @@ class EditorStyleCustomizer {
);
}
return textSpan;
return defaultTextSpanDecoratorForAttribute(
context,
node,
index,
text,
textSpan,
);
}
}