Programming codex

.NET HTML Editor Control For Windows Form Based Applications

.NET HTML Editor Control For Windows Form Based Applications

[ad_1]

Building an HTML WYSIWYG editor oriented Windows Form application on .NET Framework could never be simpler. You are a .NET Developer, looking for a WYSIWYG editor control that will take/return HTML string and you want that your application should run on .NET 2.0, 3.0, 3.5 and 4.x, right? You have landed in the right place. SpiceLogic offers you a highly efficient .NET WYSIWYG editor control for Windows Forms which GETs and SETs HTML string. You can use this control for developing windows applications like Web Page Content editor, full Web Page editor, email message composer or any application that uses a rich formatted text editor for your user. The control comes with 2 special value properties, “BodyHtml” and “DocumentHtml”. The BodyHtml Gets/Sets the partial HTML content like [b] Hello World[/b]. The Document HTML Gets/Sets the whole HTML document which can be used for a full web page like [HTML][head][/head][body][b] Hello World [/b][/body][/HTML].

The editor comes with many HTML editing tools. You can customize all of the items in the toolbars. Even if you do not want to use the default factory items and instead use your own, this control provides you a user-friendly interface to build your toolbar items. All the factory items are fully customizable. Moreover, all toolbar item functionality can be implemented externally using the rich set of public methods. This time you do not need to be bothered about localization. You can customize all the texts and replace the factory provided dialogues with your dialogues in your language! It is highly optimized for Windows Vista 64 bit operating systems. Html value properties are optimized for Data Binding. It is featured with many useful public properties, methods, and events. A good spell checker is just built-in there. Also, body style can be edited using a rich GUI CSS editor, which is available both in design time and run time.

Highlights:

Base and Relative URL support:

This control is highly suitable for HTML documents that have Relative Urls in its resource’s path reference. So, now you can show an image in the editor simply with the following tag : [img src=”myImage.jpg” /]. The control comes with a property named “BaseUrl”. You need to set that property to the image folder or internet URL. So, Guess What !! You can ship your application to your user’s pc where you simply change the Base URL programmatically so that the images can be shown in any of your user’s PC.

Spell Checker:

This control is featured with a spellchecker. You can use your dictionaries with the spellchecker.

Searching API:

Searching API is included with the control. You can use the default searching dialogue or you can implement the search dialogue yourself.

Customizable interface:

This control comes up with two factory toolbars, with many rich toolbar items. They are perfect enough to do almost all of your editing tasks. Also, you can customize them. Even if you do not want to use them and instead use your toolbar items, you can also do that.

Design mode and source mode:

There are two editing modes available. WYSIWYG design mode and Raw Html source mode which will give you complete control over the HTML content.

Events:

Two feature events are worth mentioning. Pasting event and HTML Changed event. Guess What !! You can intercept the Pasting event and manipulate the pasting content from ClipBoard and apply your filter logic. Very much useful for filtering MS Word content while pasting. HTMLChanged event, fires as soon as the HTML is changed, similar to TextChanged property of a TextBox Control. Also, you can change the default behavior of the loading and saving HTML to the editor to your needs.

Methods:

Lots of useful methods are there like getting or setting caret positions, scroll positions, GetPlainText() method. GetPlainText() method is not a return a simple text version of the HTML. Rather the returned text will preserve the layout of the original HTML content like tables, paragraphs, etc. Cool isn’t it?

Properties:

Lots of useful properties are there like Scrollbar visibility properties (GET/SET), Read-Only property (GET/SET), Word Wrap property (GET/SET). Property is available for choosing Single Line Break or Paragraph on entering a key response.

Operations composite property contains Methods associated with the toolbar items. That is, if you want to create a button of your own and give it the default copy functionality, you can invoke the Copy() method of this property.

The SelectionState property as its name goes deals with the editor’s content. Like getting the attributes of the editor items and also to determine the state of the current selection. It has properties like, IsBold, IsHyperLinkSelected, IsImageSelected, IsItalic etc. It contains one of the important properties ActiveHTMLElement of type IHTMLElement. This property gives you full programming control for getting the Active Element as Document Object Model and manipulating the Element (as a node).

DataBinding:

For Data Binding purpose you can bind any data sets’ string field to the editor’s BodyHtml or DocumentHtml properties. This will give you an excellent opportunity to use database models with the editor.

Styling the Document:

Apart from the designer mode and you can change the body style of the document right from the editor both in the designer mode and from run time.

Other exciting features include:

— Basic enough for even the most novice of users.

— Optimized for Vista 64 bit OS.

— Design time GUI Collection editor available for manipulating the properties of the toolbar items.

— Easier interface to add new toolbar item.

— HTML can be retrieve as plain old HTML, XHTML and XML

— Generates clean [span] tags for font elements; ([span]text here..[/span] (not [font]text here.[/font])

— GUI Dialog for Table Insert/Update

— GUI Dialog for editing table cells.

— GUI Search dialog; Search API is also available for implementing your search user interfaces.

[ad_2]

Source by Emran Hussain

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp

Leave a Reply

Your email address will not be published. Required fields are marked *

Search:

Topics

Recent Posts