Configure CSS support

 

KTML 4 benefits from improved CSS support than the 3.x version. To configure the CSS styles you must:

  1. Create a CSS file to use within the KTML area. Save it in a folder of choice within the site.

  2. When applying the KTML control set the correct path to the CSS file. The path must be relative to the KTML folder. By default, the CSS file used with the editor is located in the includes/ktml/styles folder.

 

The CSS drop-down menu from the KTML toolbar will display the basic classes (the ones that start with .class_name) at all times. Also, element specific styles (styles that apply only for certain elements - like td, tr, etc) will appear at the bottom of the drop-down menu when such an element is selected, or is the parent of the selected element.

 

If the CSS file you've selected for use with KTML contains redefinition of HTML tags, they will not be shown in the CSS drop-down menu, but applied on the element as it is created. One exception to this rule are the block elements (heading, the pre tag, etc) which will reflect their redefinition within the Format drop-down menu. This way, if you have a CSS rule that redefines the H1 tag, when expanding the Format drop-down menu it will display with the applied style.