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.

fix: transparent color should be treated as a highlight color

Lucas.Xu04e14c6bbae1
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart
index 5ab7f6cc50..b6051f4877 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart
@@ -255,7 +255,9 @@ List<ToolbarItem> defaultToolbarItems = [
highlightCallback: (editorState) => _allSatisfy(
editorState,
BuiltInAttributeKey.backgroundColor,
- (value) => value != null,
+ (value) {
+ return value != null && value != '0x00000000'; // transparent color;
+ },
),
handler: (editorState, context) => formatHighlight(
editorState,