hawkerm / monaco-editor-uwp

A Windows Runtime Component wrapper around the web-based Monaco Editor.
MIT License
152 stars 36 forks source link

The context menu feature doesn't work #77

Open 632575987 opened 10 months ago

632575987 commented 10 months ago

In 0.9.0-beta version , the cut/copy/paste...context menu not work , Is it extra code to set up the Options?


<Page
    x:Class="App4.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App4"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:mo="using:Monaco"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid>
        <mo:CodeEditor x:Name="ce" Text="select * from dual;" CodeLanguage="sql"/>
    </Grid>
</Page>

ce.CodeLanguage = "sql";
ce.Options.CopyWithSyntaxHighlighting = true;
//ce.Options.Contextmenu = true;
ce.Options.Contextmenu = false;
//I dont know how to make the contextmenu work...

demo2