How to build a web design program in C# [closed]
I would like to build my own html gui editor, but I can't figure out the basic structure for the application.
Does anyone know of any sample code for building an editor? I would like to use Visual Studio 2010.
The part I don't know is how to build a wysiwyg area to display a page that is being designed.
Any help is appretiated
Most editors are based on the WebBrowser control that comes with Visual Studio. For more info see:
http://www.codeproject.com/KB/miscctrl/csEXWB.aspx
Or if you are more adventurous there are also solutions involving WebKit and Gecko browser engines discussed here:
Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?
There is also MSHTML : http://msdn.microsoft.com/en-us/library/aa753630(VS.85).aspx
The editor provided with MSHTML offers a "what you see is what you get" (WYSIWYG) HTML editing environment with a rich set of capabilities. It can be activated from C++, Visual Basic, and script. You can use a number of techniques to customize the MSHTML Editor. These techniques are available in C++ only.
Here is a .net wrapper: http://www.itwriting.com/htmleditor/index.php
The HTMLEditor is written in C#. Unlike the .Net webbrowser control, in versions prior to .NET 2.0, this is not an ActiveX control. Rather it is an ActiveX Document. Even if you are not interested in MSHTML, you may be interested in the HTMLEditor as an example of advanced .NET / COM interop. It's also not suitable for embedded web browsing - use the ActiveX for that.
However, it is a pretty cool control. It allows editing as well as read-only display, supports advanced features like print templates and edit designers, gives easy access to the HTML DOM, and lets you load HTML simply by assigning a string to a property.
SO user leppie made a very nice editor xacc.ide.
精彩评论