fix: transparent color should be treated as a highlight color

This commit is contained in:
Lucas.Xu 2022-11-28 16:22:10 +08:00
parent d75645c4bc
commit 04e14c6bba

View File

@ -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,