Persist boolean logic for showSelectionToolbar

pull/1320/head
operatorultra 2 years ago
parent 0885d4fd54
commit 3f3614e786
  1. 9
      lib/src/widgets/editor.dart

@ -191,6 +191,7 @@ class QuillEditor extends StatefulWidget {
this.customLinkPrefixes = const <String>[], this.customLinkPrefixes = const <String>[],
this.dialogTheme, this.dialogTheme,
this.contentInsertionConfiguration, this.contentInsertionConfiguration,
this.contextMenuBuilder,
Key? key, Key? key,
}) : super(key: key); }) : super(key: key);
@ -432,6 +433,9 @@ class QuillEditor extends StatefulWidget {
/// Configures the dialog theme. /// Configures the dialog theme.
final QuillDialogTheme? dialogTheme; final QuillDialogTheme? dialogTheme;
// Allows for creating a custom context menu
final QuillEditorContextMenuBuilder? contextMenuBuilder;
/// Configuration of handler for media content inserted via the system input /// Configuration of handler for media content inserted via the system input
/// method. /// method.
/// ///
@ -503,8 +507,9 @@ class QuillEditorState extends State<QuillEditor>
readOnly: widget.readOnly, readOnly: widget.readOnly,
placeholder: widget.placeholder, placeholder: widget.placeholder,
onLaunchUrl: widget.onLaunchUrl, onLaunchUrl: widget.onLaunchUrl,
contextMenuBuilder: contextMenuBuilder: showSelectionToolbar
showSelectionToolbar ? RawEditor.defaultContextMenuBuilder : null, ? (widget.contextMenuBuilder ?? RawEditor.defaultContextMenuBuilder)
: null,
showSelectionHandles: isMobile(theme.platform), showSelectionHandles: isMobile(theme.platform),
showCursor: widget.showCursor, showCursor: widget.showCursor,
cursorStyle: CursorStyle( cursorStyle: CursorStyle(

Loading…
Cancel
Save