Asp net wysiwyg editor

ASP.NET is a popular programming language used for developing web applications. One common requirement in web development is the need for a WYSIWYG (What You See Is What You Get) editor. A WYSIWYG editor allows users to create and edit content in a visual manner, similar to using a word processor.

To implement a WYSIWYG editor in ASP.NET, there are several options available. One popular choice is the Telerik RadEditor, provides a rich set of features and a user-friendly interface. Let's take a look at how to integrate the Telerik RadEditor into an ASP.NET application.

First, we need to include the necessary references and for the Telerik RadEditor. This can be done by the following code at the beginning of the ASP.NET code:

Once the references are added, we can proceed with adding the RadEditor control to our ASP.NET page. This can be done by adding the following code:

This code will render the RadEditor control on the page, allowing users to create and edit content. However, we also need to configure the editor to specific features and customize its behavior.

To configure the RadEditor, we can use the properties and methods provided by the control. For , we can set the editor's height and width, enable or specific toolbar buttons, and define the content filters. Here's an example of how to configure the RadEditor:

In this example, we set the height of the editor to 400 pixels, the width to 100% of the container, and specify a custom tools file for the toolbar buttons. We also enable content filtering to that only allowed HTML tags and attributes are allowed.

Handling User Input

Once the RadEditor is configured, we need to handle the user input and retrieve the content entered by the user. This can be done by accessing the Text property of the RadEditor control. Here's an example of how to retrieve the content entered by the user:

string content = RadEditor1.Text;

In this example, we store the content entered by the user in a string variable called “content”. We can then use this variable to save the content to a , send it via email, or perform any other required operations.


In conclusion, implementing a WYSIWYG editor in ASP.NET is a straightforward process. By using the Telerik RadEditor control, we can easily provide users with a rich experience and retrieve the content entered by them. With the ability to customize the editor's behavior and enable specific features, we can tailor the WYSIWYG editor to meet the requirements of our web application.

Rate this post

Leave a Reply

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

Table of Contents