Rate this article

How can I set the default font for the KTML editor

Rating: 4.7/5 (3 votes cast)

As you all know you can define the allowed fonts that can be used in the editor but you can not easily set the default font.
It defaults to the typical "Times Roman" font.

To set the default font to match your website default font-family do the following;

Search for the code that looks similar to this.
Note: It will not be the same as this example as every ktml instance can be different, depending on your ktml configuration.

<script type="text/javascript">
    art_content_config = {
        "width": 700,
        "height": 450,
        "show_toolbar": "load",
        "show_pi": true,
        "background_color": "#FFFFFF",
        "strip_server_location": true,
        "auto_focus": false,
        "module_props": { },
        "buttons": [
            [1, "standard", ["cut", "copy", "paste", "undo", "redo", "find_replace", "toggle_visible", "spellcheck", "toggle_editmode", "toggle_fullscreen", "help"]],
            [1, "formatting", ["bold", "italic", "underline", "align_left", "align_center", "align_right", "align_justify", "numbered_list", "bulleted_list", "outdent", "indent", "clean_menu", "foreground_color", "background_color", "superscript", "subscript"]],
            [2, "styles", ["heading_list", "style_list", "fontsize_list"]],
            [2, "insert", ["insert_link", "insert_anchor", "insert_table", "insert_image", "insert_file", "insert_template", "horizontal_rule", "insert_character"]]
        ]

Now add these two line just below the  "background_color": "#FFFFFF", entry

        "font_family": "Arial, Geneva, Helvetica, sans-serif",
        "font_size": "12px",

Adobe

Free PositiveSSL and WhoisGuard with Every Domain Purchase
ionCube Online PHP Encoder
XMS Systems

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company