formatHighlightColor function

void formatHighlightColor(
  1. EditorState editorState,
  2. Selection? selection,
  3. String? color, {
  4. bool withUpdateSelection = false,
})

Implementation

void formatHighlightColor(
  EditorState editorState,
  Selection? selection,
  String? color, {
  bool withUpdateSelection = false,
}) {
  editorState.formatDelta(
    selection,
    {AppFlowyRichTextKeys.backgroundColor: color},
    withUpdateSelection: withUpdateSelection,
  );
}