Enable MaterialEditorRenderer (Copy, Cut and Selection) of Multiline Text

Tasi Mals 1 Reputation point


I am using Xamarin Forms to render an Editor that allows for multiline text. However, when I long press in the Editor box when it already has more than 1 line of text, the menu is not showing up to select/cut/copy the text. How do I enable this menu? It works if it's a single line of text.

I have already set this to true, so it should work but doesn't work. Control.EditText.SetTextIsSelectable

This is the code I have in the Android Project.

[assembly: ExportRenderer(typeof(CustomEditor), typeof(CustomEditorRenderer))]

namespace MyProject.Droid.MRenderers
    public class CustomEditorRenderer : MaterialEditorRenderer
        public CustomEditorRenderer(Context context) : base(context)

        protected override void OnElementChanged(ElementChangedEventArgs<Editor> e)

            if (Control != null)

                    //This is the HeightRequest 
                    var ElementHeightRequest = Element.HeightRequest;
                    //Convert it to Pixels
                    var EditTextHeight= ConvertToPixels(ElementHeightRequest);
                    //Set the Control's EditText height 
                Control.EditText.Background = null;
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,315 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points


    Welcome to Microsoft Q&A!

    Test on Xamarin.Forms 5.x , it works fine , the edit menu shows up as expected .


    Could you also provide the code in forms project(xaml and code behind) ?

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments