Greetings,
I want to use the RadEditor with all of its default toolbars and buttons. On top of this I want to add one custom RadComboBox.
Is this possible and if so, is there and example somewhere of how to add the combo box in VB, HTML or the ToolsFile?
Thanks!!
I want to use the RadEditor with all of its default toolbars and buttons. On top of this I want to add one custom RadComboBox.
Is this possible and if so, is there and example somewhere of how to add the combo box in VB, HTML or the ToolsFile?
Thanks!!
7 Answers, 1 is accepted
0
Hi John,
Please, see the following forum post on the subject: Can I add a combobox to radeditor's tools collection?.
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.
Please, see the following forum post on the subject: Can I add a combobox to radeditor's tools collection?.
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
John
Top achievements
Rank 1
answered on 14 Jul 2009, 02:04 PM
Appreciate the help on this.
I'm wondering if I missed something because the code for this example places the ComboBox above the RadEditor rather than within it. Do you agree?
Is there a way to have the ComboBox appear on the RadEditor using the TtoolsFile, Code Behind, anything?
Thanks!
0
John
Top achievements
Rank 1
answered on 14 Jul 2009, 02:21 PM
If there is no way to add a ComboBox to the editor, how can I populate existing buttons (which look like combos) with my own information.
For instance, one of the existing buttons which looks like a ComboBox has font names within it. How would I use this existing button to populate my own information. Better yet, how could I duplicate this button and then add my own information. I say 'duplicate' because I would want to keep the font names drop-down, not get rid of it.
At any rate, surely there is a way to create these kinds of buttons which are larger than the normal buttons - yes/no?
Thanks!
For instance, one of the existing buttons which looks like a ComboBox has font names within it. How would I use this existing button to populate my own information. Better yet, how could I duplicate this button and then add my own information. I say 'duplicate' because I would want to keep the font names drop-down, not get rid of it.
At any rate, surely there is a way to create these kinds of buttons which are larger than the normal buttons - yes/no?
Thanks!
0
Hi John,
You can easily add custom dropdowns to the editor with your own items as shown in the following demo:
http://demos.telerik.com/aspnet-ajax/editor/examples/customdropdowns/defaultcs.aspx
Best wishes,
Tervel
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.
You can easily add custom dropdowns to the editor with your own items as shown in the following demo:
http://demos.telerik.com/aspnet-ajax/editor/examples/customdropdowns/defaultcs.aspx
Best wishes,
Tervel
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
John
Top achievements
Rank 1
answered on 14 Jul 2009, 03:09 PM
Thanks for your help.
Regarding the link you provided, I was able to get that code to work for a splitbutton. However, the limitation of the splitbutton in my case is that the splitbutton has no property that will allow me to adjust the width. Thus, I am forced to try and use the ComboBox because the width nicely adjustable. Now however, my big challenge is to get the ComboBox to appear within the editor.
Did I miss anything in the link you provided??
Thanks!
Regarding the link you provided, I was able to get that code to work for a splitbutton. However, the limitation of the splitbutton in my case is that the splitbutton has no property that will allow me to adjust the width. Thus, I am forced to try and use the ComboBox because the width nicely adjustable. Now however, my big challenge is to get the ComboBox to appear within the editor.
Did I miss anything in the link you provided??
Thanks!
0
Hi John,
The splitbutton is consisted of two parts:
- left placed button with an icon
- a single downward-pointing triangle button placed at the rightmost portion that when clicked will drop down a menu.
Both parts of the splitbutton cannot be resized and the button does not offer a width property.
In your scenario you should implement a custom dropdown that allows to set its width, e.g.
ASPX:
Default.aspx.cs (Codebehind file):
For your convenience I have attached my test files.
If you still experience any problems, please open a support ticket and send a fully working project along with screenshots demonstrating them.
Sincerely,
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.
The splitbutton is consisted of two parts:
- left placed button with an icon
- a single downward-pointing triangle button placed at the rightmost portion that when clicked will drop down a menu.
Both parts of the splitbutton cannot be resized and the button does not offer a width property.
In your scenario you should implement a custom dropdown that allows to set its width, e.g.
ASPX:
| <telerik:radeditor runat="server" ID="RadEditor1" OnClientCommandExecuting="OnClientCommandExecuting"> |
| <Tools> |
| <telerik:EditorToolGroup> |
| <telerik:EditorDropDown Name="LineSpacing" Text="Line Spacing" PopupWidth="110px" PopupHeight="90px" Width="400px" > |
| <telerik:EditorDropDownItem Name ="Default" value="" /> |
| <telerik:EditorDropDownItem Name ="Single space" value="20px" /> |
| <telerik:EditorDropDownItem Name ="1.5 Lines" value="35px" /> |
| <telerik:EditorDropDownItem Name ="Double spacing" value="50px" /> |
| </telerik:EditorDropDown> |
| </telerik:EditorToolGroup> |
| </Tools> |
| </telerik:radeditor> |
| <script type="text/javascript"> |
| function OnClientCommandExecuting(editor, args) |
| { |
| var name = args.get_commandName(); |
| var val = args.get_value(); |
| var cArea = editor.get_contentArea(); |
| if (name == "LineSpacing") |
| { |
| if (cArea.firstChild && cArea.firstChild.tagName == "P") |
| { |
| cArea.firstChild.style.lineHeight = val; |
| } |
| else |
| { |
| editor.set_html("<p style='line-height:" + val + "'>" + editor.get_html() + "</p>"); |
| } |
| args.set_cancel(true); |
| } |
| } |
| </script> |
Default.aspx.cs (Codebehind file):
| protected void Page_Load(object sender, EventArgs e) |
| { |
| //set the width |
| RadEditor1.FindTool("LineSpacing").Attributes["width"] = "210px"; |
| } |
For your convenience I have attached my test files.
If you still experience any problems, please open a support ticket and send a fully working project along with screenshots demonstrating them.
Sincerely,
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
John
Top achievements
Rank 1
answered on 17 Jul 2009, 08:24 PM
That about does the trick.
Thanks much !
Thanks much !
