O'Reilly logo

ASP.NET MVC 2 Cookbook by Richard Kimber, Andrew Siemer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a custom HTML helper to display a WYSIWYG

In this recipe, we are going to take a look at how you can create your own HTML helpers by using extension methods. This will allow you to quickly add all sorts of functionality that will be right at your fingertips when knocking together forms. We will specifically build an HTML helper to display a What You See Is What You Get (WYSIWYG) editor.

Getting started

In order for us to see how an HTML helper is created to display a WYSIWYG, we first need to go grab a WYSIWYG editor to be displayed. I will be working with the CKEditor—you can probably get just about any WYSIWYG to work. Go to http://ckeditor.com/download to download the CKEditor. There is also a copy in the dependencies directory!

We're ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required