Problem with set Default for Dropdown Size

2 posts, 0 answers
  1. nguyen
    nguyen avatar
    19 posts
    Member since:
    Aug 2012

    Posted 19 Aug 2013 Link to this post


    i want to set default size in Dropdownlist Size using tool file:

    iam using this code:
    <script type='text/javascript'>
            function OnClientLoad(editor, args) {
                var fontFamily = editor.getToolByName("FontName");
                var fontSize = editor.getToolByName("FontSize");
                var timeout = (document.all) ? timeout = 0 : timeout = 1000;
                setTimeout(function () {
                    fontFamily._element.getElementsByTagName("span")[0].innerHTML = "Arial"; 
                    fontSize._element.getElementsByTagName("span")[0].innerHTML = "2";
                }, timeout);

    i can set default size (1.jpg File Attach), but when i write some word in Editor, the Size is changed to "Size" and RealFontSize is Changed (2.jpg File Attach).

    Please Help me to resolve  Set Default Size ( not real font size) and do not change.

    this is content of toolfile.xml:

    <tools name="MainToolbar" dockable="true" enabled="true">
    <tool name="AjaxSpellCheck" />
    <tool name="FindAndReplace" />
    <tool separator="true"/>
    <tool name="Undo" />
    <tool name="Redo" />
    <tool separator="true"/>
    <tool name="Cut" />
    <tool name="Copy" />
    <tool name="Paste" shortcut="CTRL+!"/>

    <tools name="Formatting" enabled="true" dockable="true">
    <tool name="Bold" />
    <tool name="Italic" />
    <tool name="Underline" />
    <tool separator="true"/>
    <tool name="ForeColor" />
    <tool name="BackColor"/>
    <tool separator="true"/>
    <tool name="FontName"/>
    <tool name="FontSize"/>
    <tool name="RealFontSize"/>   


    thanks So much!!

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Aug 2013 Link to this post

    Hi Nguyen

    Check the following KB article which explains the same scenario
    No FONT tags are applied when I type text in the editor

    Hope this helps

Back to Top