![](/img/trans.png)
[英]Displaying a PDF file from Web Server in WPF C# using WebBrowser-Control
[英]Browser Spellcheck for TinyMCE TextArea in WebBrowser-Control - WPF C#
问题 :当我运行WPF C#应用程序时内置的浏览器拼写检查不起作用,尽管当我在Internet Explorer 11中加载index.html文件时拼写检查有效
的index.html
<!-- saved from url=(0011)about:blank -->
<!DOCTYPE html>
<html lang="en" spellcheck="true">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=11">
<script src="tinymce/tinymce.js" ></script>
</head>
<body>
<textarea class="mceEditor form-control form-control-sm" id="myEditor" spellcheck="true" contenteditable="false" unselectable="on"></textarea>
</body>
<script type="text/javascript">
tinymce.init({
theme: 'modern',
browser_spellcheck: true,
contextmenu: false,
branding: false,
selector: 'textarea',
menubar: false,
mode: "specific_textareas",
editor_selector : "mceEditor",
plugins: [
'autolink lists link',
'searchreplace visualblocks',
'wordcount'
],
toolbar: 'undo redo | bold italic underline | alignleft aligncenter | bullist numlist outdent indent | removeformat',
});
</script>
</html>
MainWindow.xaml
<WebBrowser Grid.Row="1" x:Name="wb" Navigated="wb_Navigated" />
MainWindow.xaml.cs
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DataContext = vm;
Uri myUri;
myUri = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"Resources\index.html");
wb.Navigate(myUri);
}
private void wb_Navigated(object sender, NavigationEventArgs e)
{
vm.document = (HTMLDocument)wb.Document;
}
}
Internet Explorer 11中的index.html
必需的解决方案 :在我的WPF C#WebBrowser中用红色下划线标记“thisisatypo”,就像它出现在Internet Explorer 11中一样。如果您需要更多详细信息,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.