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

[Solved] Change text to EditorDropDown with Javascript

1 Answer 115 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Miguel Reig
Top achievements
Rank 1
Miguel Reig asked on 26 May 2008, 09:21 AM
It's possible to change the text to an EditorDropDown with Javascript?

We need to put the selected item to the text of EditorDropDown.

Thank you!

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 May 2008, 03:32 PM
Hi Miguel,

Here is an example demonstrating how to change the dropdown header text of the FormatBlock dropdown with yours:

<telerik:radeditor runat="server" OnClientLoad="ChangeText" ID="RadEditor1"></telerik:radeditor>

<script type="text/javascript">
function ChangeText(editor, args)
{
    var dropdown = editor.getToolByName("FormatBlock"); //put here the name of the dropdown which you want to customize
    var headerText = dropdown.get_element();
    headerText.firstChild.title  = "test";
    headerText.firstChild.innerHTML  = "test";
}
</script>

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Miguel Reig
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or