This is a migrated thread and some comments may be shown as answers.

Problem with set Default for Dropdown Size

1 Answer 10 Views
Editor
This is a migrated thread and some comments may be shown as answers.
nguyen
Top achievements
Rank 1
nguyen asked on 19 Aug 2013, 10:53 AM
hello, 

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);
        }</script>

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:

<root>
<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>

<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"/>   
</tools>

</root>
.



thanks So much!!


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 19 Aug 2013, 01:21 PM
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

Thanks
Shinu.
Tags
Editor
Asked by
nguyen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or