Open
Description
Have you checked for an existing issue?
- I have searched the existing issues
Use case
Have access to native context menus like Translate, Search, etc.
Proposal
Changes in raw_editor_state.dart
:
If we check in the Flutter text field, we can access those native context menus. What we need to do is load it in raw_editor_state.dart
, then add them to the contextMenuButtonItems
.
@protected
@override
void initState() {
super.initState();
....
_initProcessTextActions();
}
/// Query the engine to initialize the list of text processing actions to show
/// in the text selection toolbar.
Future<void> _initProcessTextActions() async {
_processTextActions.clear();
_processTextActions.addAll(await _processTextService.queryTextActions());
}
List<ContextMenuButtonItem> get contextMenuButtonItems {
return buttonItemsForToolbarOptions() ??
EditableText.getEditableButtonItems(
...
)
..addAll(_textProcessingActionButtonItems); <--- add them here.
}
Reference
- package:flutter/src/widgets/editable_text.dart:2946
I already added them to my app but it will be great to have them directly in Flutter Quill so I don't have to customize & will also benefit all Quill users.