Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net framework WPF应用程序中Webview2中的GetText函数_Wpf_Webview2 - Fatal编程技术网

.net framework WPF应用程序中Webview2中的GetText函数

.net framework WPF应用程序中Webview2中的GetText函数,wpf,webview2,Wpf,Webview2,我最近在Webview2上试用ace编辑器,因为cefsharp非常耗电。我的问题是,我似乎找不到一种方法来使用C代码在编辑器中获取文本,似乎没有包含任何函数,我已经研究了大约一天,但没有发现任何结果。尝试使用ace api,非常确定它有一个GetText函数。 编辑 您可以使用如下函数获取文本并将其打印到文本框: // Note to you idk.xyz, use sx.Execute(EditorText); String EditorText = Json.Decode(await

我最近在Webview2上试用ace编辑器,因为cefsharp非常耗电。我的问题是,我似乎找不到一种方法来使用C代码在编辑器中获取文本,似乎没有包含任何函数,我已经研究了大约一天,但没有发现任何结果。

尝试使用ace api,非常确定它有一个GetText函数。 编辑

您可以使用如下函数获取文本并将其打印到文本框:

// Note to you idk.xyz, use sx.Execute(EditorText);
String EditorText = Json.Decode(await 
Editor.ExecuteScriptAsync("GetText();"));
// The line below just proves that it gets the text in the ace editor.
aaaa.Text = EditorText;
我将链接一个项目,其中也有一个例子:

编辑:谢谢你的投票❤