![Multiplatform HtmlEditor](https://i-blog.csdnimg.cn/blog_migrate/e30d057db9fe9683dcfce6514b271157.jpeg)
介绍 (Introduction)
With .NET Core 3, C# developers have now many possibilities to develop truly multiplatform GUI applications. You can find a study of these solutions in a recently released book:
借助.NET Core 3,C#开发人员现在可以开发出真正的多平台GUI应用程序。 您可以在最近发行的书中找到有关这些解决方案的研究:
Electron.NET is one of the solutions presented in this book, it provides all means to code a GUI application for Windows, Linux and Mac OS X based on the same .NET Core 3 project. Electron.NET is the .NET Core wrapper around the famous Electron framework (based on NodeJS).
Electron.NET是本书介绍的解决方案之一,它提供了所有基于同一.NET Core 3项目为Windows,Linux和Mac OS X编写GUI应用程序的方法。 Electron.NET是围绕着著名的Electron框架(基于NodeJS)的.NET Core包装器。
For illustrating the use of this tool, I will develop an HTML Editor application. This prototype program illustrates the Electron.NET’s capacity to use JavaScript component inside a cross platform desktop application. In our case, the CKeditor is used for the implementation of the editor itself.
为了说明该工具的用法,我将开发一个HTML编辑器应用程序。 该原型程序说明了Electron.NET在跨平台桌面应用程序中使用JavaScript组件的能力。 在我们的例子中, CKeditor用于实现编辑器本身。
An Electron.NET application is built from an ASP.NET MVC web application, and, therefore extended with the specifics features of a desktop application by using the Electron wrapper for .NET Core: Electron.NET.
Electron.NET应用程序是从ASP.NET MVC Web应用程序构建的,因此通过使用.NET Core的Electron包装器,扩展了桌面应用程序的特定功能:Electron.NET。
先决条件 (Prerequisites)
Before reviewing the development of the HTMLEditor
application with Electron.NET, you have to install the appropriate development environment.
在使用Electron.NET审查HTMLEditor
应用程序的开发之前,您必须安装适当的开发环境。
So you should have installed on your computer:
因此,您应该已经在计算机上安装了:
NodeJS
节点JS
NPM
NPM
Electron.NET global tool for dotnet CLI (see the GitHub website)
适用于dotnet CLI的Electron.NET全局工具(请参阅GitHub网站)
Check the GitHub web site of the project: https://github.com/ElectronNET/Electron.NET.
检查该项目的GitHub网站: https : //github.com/ElectronNET/Electron.NET 。
The HtmlEditor
application use the 5.30.1 version of Electron.NET.
HtmlEditor
应用程序使用5.30.1版本的Electron.NET。
Be careful, you have to double check that you are using the appropriate .NET Core version, the current version of Electron.NET is targeting the .NET Core 3.0 (if you use