Configure KTML 4 control properties

In this topic you will learn how to apply and configure the KTML 4 online HTML editor through the Visual Studio control installed in the previous topic.

 

Apply the KTML control

 

The KTML4 control can be used either as a stand-alone web control, or as an enhancement to an existing text box, text area or hidden field.  If using the first option, you will have to add code that handles the content of the editor - its retrieval through the ktml.text property and the later use. If using KTML to enhance a text box, the editor content will be automatically posted as the field value. Use this last option when you want to enhance existing pages without recreating them, and the first on new pages, where two controls are not necessary.

If you want to use it as a stand-alone control, you will simply have to drag and drop the KTML editor icon from the Toolbox onto the page. A visual representation of the editor will be displayed:
 


 

After adding the control, the text edited by the user can be accessed through the KTML_ID.Text property. All control properties can be set within the Properties panel, after selecting it on the page.

The second method of using the control is to bind it to an existing text box or text area. To use KTML as a form field enhancement:

  1. Add a new Text box, Text area or Hidden field, if you do not have any on the page. In the examples that follow, a Textbox with the id content is used:


     

  2. Next drag and drop the KTML 4 control from the InterAKT tab of the Toolbox after the Textbox added to the page. An image will be displayed to symbolize the control:


     

  3. Next you must configure the binding between the two elements. With the KTML visual representation selected, in the Properties panel select the ControlToBindTo entry. In the drop-down menu select the Text Box created earlier - content.


     

The KTML content is automatically posted as the text box's text value, so no further code is needed to retrieve and use it in your particular queries.

 

Configure the KTML properties

Whatever method of usage is selected, the KTML control can be configured through the Properties panel. The panel is populated with the control specific options when it is selected on page. Most of the options come with default values already configured, for ease of use.

The options are grouped in four (4) categories:

  1.  Configure the KTML4 Basic options as follows:

  2. The next set of options to configure is KTML4 Advanced. Through this set of properties you can define the editor behavior:

  3. With the options on the KTML4 Security category you can decide what file types to allow and more:

  4. In the KTML4 Toolbars define the buttons ti be displayed in the editor toolbar. This category contains two settings:

  5. When you have finished configuring the control, save the page and preview it in a browser. Instead of the textbox, the KTML 4 editor will be displayed: