desktopEditor method

dynamic desktopEditor()

Implementation

Widget desktopEditor() {
  return FloatingToolbar(
    items: [
      paragraphItem,
      ...headingItems,
      ...markdownFormatItems,
      quoteItem,
      bulletedListItem,
      numberedListItem,
      linkItem,
      buildHighlightColorItem(),
    ],
    textDirection: _textDirection,
    editorState: editorState,
    editorScrollController: editorScrollController,
    style: FloatingToolbarStyle(
      backgroundColor: Theme.of(context).colorScheme.surface,
      toolbarActiveColor: Theme.of(context).colorScheme.tertiary,
    ),
    child: Directionality(
      textDirection: _textDirection,
      child: AppFlowyEditor(
        // widget pass through
        editable: widget.editable,
        shrinkWrap: widget.shrinkWrap,
        autoFocus: widget.autoFocus,
        header: widget.header,
        // local states
        editorScrollController: editorScrollController,
        editorState: editorState,
        editorStyle: desktopEditorStyle(),
        footer: generateFooter(),
      ),
    ),
  );
}