File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed
frontend/app_flowy/packages/appflowy_editor Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,14 @@ final List<SelectionMenuItem> _defaultSelectionMenuItems = [
169169 insertCheckboxAfterSelection (editorState);
170170 },
171171 ),
172+ SelectionMenuItem (
173+ name: 'Quote' ,
174+ icon: _selectionMenuIcon ('quote' ),
175+ keywords: ['quote' , 'refer' ],
176+ handler: (editorState, _, __) {
177+ insertQuoteAfterSelection (editorState);
178+ },
179+ ),
172180];
173181
174182Widget _selectionMenuIcon (String name) {
Original file line number Diff line number Diff line change @@ -38,17 +38,17 @@ void main() async {
3838 await editor.pressLogicKey (LogicalKeyboardKey .keyE);
3939 expect (
4040 find.byType (SelectionMenuItemWidget , skipOffstage: false ),
41- findsNWidgets (2 ),
41+ findsNWidgets (3 ),
4242 );
4343 await editor.pressLogicKey (LogicalKeyboardKey .backspace);
4444 expect (
4545 find.byType (SelectionMenuItemWidget , skipOffstage: false ),
46- findsNWidgets (3 ),
46+ findsNWidgets (4 ),
4747 );
4848 await editor.pressLogicKey (LogicalKeyboardKey .keyE);
4949 expect (
5050 find.byType (SelectionMenuItemWidget , skipOffstage: false ),
51- findsNWidgets (2 ),
51+ findsNWidgets (3 ),
5252 );
5353 await editor.pressLogicKey (LogicalKeyboardKey .keyX);
5454 expect (
@@ -73,7 +73,7 @@ void main() async {
7373 await editor.pressLogicKey (LogicalKeyboardKey .keyE);
7474 expect (
7575 find.byType (SelectionMenuItemWidget , skipOffstage: false ),
76- findsNWidgets (2 ),
76+ findsNWidgets (3 ),
7777 );
7878 await editor.pressLogicKey (LogicalKeyboardKey .escape);
7979 expect (
@@ -89,7 +89,7 @@ void main() async {
8989 await editor.pressLogicKey (LogicalKeyboardKey .keyE);
9090 expect (
9191 find.byType (SelectionMenuItemWidget , skipOffstage: false ),
92- findsNWidgets (2 ),
92+ findsNWidgets (3 ),
9393 );
9494 await editor.pressLogicKey (LogicalKeyboardKey .backspace);
9595 await editor.pressLogicKey (LogicalKeyboardKey .backspace);
You can’t perform that action at this time.
0 commit comments