Closed zthrive closed 7 months ago
I have no idea why the default selectable text behaviour change, but you try the contextMenuBuilder below.
EasyRichText(
"This paragraph is selectable...",
selectable: true,
contextMenuBuilder: (context, editableTextState) {
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: editableTextState.contextMenuAnchors,
buttonItems: <ContextMenuButtonItem>[
ContextMenuButtonItem(
onPressed: () {
editableTextState
.copySelection(SelectionChangedCause.toolbar);
},
type: ContextMenuButtonType.copy,
),
ContextMenuButtonItem(
onPressed: () {
editableTextState
.selectAll(SelectionChangedCause.toolbar);
},
type: ContextMenuButtonType.selectAll,
),
],
);
},
),
Thank you for the update. It works now :).
Have a nice day.
Best
On Fri, 5 Apr 2024 at 14:43, hans.huang @.***> wrote:
I have no idea why the default selectable text behaviour change, but you try the contextMenuBuilder below.
EasyRichText( "This paragraph is selectable...", selectable: true, contextMenuBuilder: (context, editableTextState) { return AdaptiveTextSelectionToolbar.buttonItems( anchors: editableTextState.contextMenuAnchors, buttonItems:
[ ContextMenuButtonItem( onPressed: () { editableTextState .copySelection(SelectionChangedCause.toolbar); }, type: ContextMenuButtonType.copy, ), ContextMenuButtonItem( onPressed: () { editableTextState .selectAll(SelectionChangedCause.toolbar); }, type: ContextMenuButtonType.selectAll, ), ], ); }, ), — Reply to this email directly, view it on GitHub https://github.com/2000calories/flutter_easy_rich_text/issues/54#issuecomment-2038810471, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDUBCLBHCUZXC6RPWAZIFLY3YMWBAVCNFSM6AAAAABB4PROXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZYHAYTANBXGE . You are receiving this because you authored the thread.Message ID: @.***>
You can select the text but you cannot copy it to the clipboard