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

[Solved] Bug with dropdown (InsertSnippet)

2 Answers 92 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Yasar
Top achievements
Rank 1
Yasar asked on 07 May 2009, 08:43 AM
Hi everyone!

I am using RadEditor to create custom documents.
I have a dropdown list which is dynamicaly binded with a certain set of values. When I clicked on the button in the header for the first time dropdown appears, and clicking on a value (dropdown element) add it to body text in editor.
When I click the same button (to see dropdown) again, instead of showing dropdown it add the previous element to the body text once more and it repeats if I keep on clicking.
I am unable to select more than one values from dropdown.!

I wonder if there is anything wrong at my end, or something wrong with control.

Can you suggest a fix to this issue?

Regards,
Yasar Mumtaz
Bluegarden AS
Norway

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 11 May 2009, 08:02 AM
Hello Yasar,

The "Insert snippet" tool of RadEditor is of type ToolStrip and it works similarly to the color dropdowns of MS Word. You can expand the dropdown by clicking on the little arrow icon.

You can disable the insertion of the lastly selected dropdown item when clicking on the header by using the following code:

<script type="text/javascript">  
function OnClientLoad(editor)  
{  
    var tool = editor.getToolByName("InsertSnippet");  
    //Disable header update functionality  
    tool.set_updateHeader(false);  
</script> 
<telerik:RadEditor ID="RadEditor1" runat="server"  OnClientLoad="OnClientLoad"
<Snippets> 
    <telerik:EditorSnippet Name="test1" Value="test1"></telerik:EditorSnippet> 
    <telerik:EditorSnippet Name="test2" Value="test2"></telerik:EditorSnippet> 
    <telerik:EditorSnippet Name="test3" Value="test3"></telerik:EditorSnippet> 
</Snippets> 
 
</telerik:RadEditor> 



All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Yasar
Top achievements
Rank 1
answered on 11 May 2009, 08:34 AM
Hi,

It works :)
But it would have been difficult for me to reach this solution without your support.
Thanks!

Yasar
Tags
Editor
Asked by
Yasar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Yasar
Top achievements
Rank 1
Share this question
or