Replace textarea with HTML editor

In this topic you will modify the form that allows adding and editing articles so that authors and editors can create HTML in a visual manner. You will use the KTML 4 Dreamweaver extension to replace the form generated textarea:

  1. Open the admin/form page in Dreamweaver.

  2. Click on the textarea to select it.

  3. Go to the Server Behaviors tab > Plus (+) > KTML4 and select the KTML4 entry. The user interface that opens is divided into four (4) tabs which are explained below.

  4. In the Basic tab configure general editor settings:


                         

  5. In the Toolbars tab configure what editor toolbars and buttons will be displayed. Because the editor will be used by registered users only, you can safely allow all options. In the Toolbar presets drop-down menu select All:


                             

  6. With the Security tab define what security restrictions you need, regarding files and folders:


                              

  7. On the last tab - Advanced - define some of the KTML 4 editor's behavior settings:


               

  8. When you are done setting all options, click OK to close the user interface and apply the changes.

A full scale representation of the editor will be displayed instead of the textarea within Dreamweaver:


 

This is all it took to enhance the way authors and editors add content. Instead of having to know at least the basic HTML tags, they can now use a full-featured rich HTML visual editor.

To try it out, save the page, then login with an author or editor account. When viewing one of the existing articles - with an editor or the webmaster account - it will be displayed within the editor the same way it is displayed on page:

 

In the next topic you will add the finishing touch by allowing only the right users to add, edit or delete articles.