As I expirenced that all the buttons are disabled when switch editor to HTML source mode.
Is it possible to make buttons enabled in source mode? At least find and replace functionality which is really important tool for editing the source.
Is it possible to make buttons enabled in source mode? At least find and replace functionality which is really important tool for editing the source.
6 Answers, 1 is accepted
0
Hi Jasper,
We agree with you that it will be a great feature to enable buttons such as Find and Replace in Html mode and this feature is already planned for one of the next versions of RadEditor. You can see that currently the toolbar is not hidden but only disabled in Html mode and it is a matter of time to enable some of the buttons in that mode.
All the best,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
We agree with you that it will be a great feature to enable buttons such as Find and Replace in Html mode and this feature is already planned for one of the next versions of RadEditor. You can see that currently the toolbar is not hidden but only disabled in Html mode and it is a matter of time to enable some of the buttons in that mode.
All the best,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jonathan Ruckert
Top achievements
Rank 1
answered on 05 Dec 2008, 05:51 AM
Is there a workaround for this scenario?
In some instances, we only display a "Preview" mode. However we still want them to print the text.
We have put on the page a test button which should enable that icon on the toolbar.
This enables the button as expected, but the event does not fire (this is a custom print button (from the examples with style sheets)).
Any ideas?
Cheers,
Jonathan
In some instances, we only display a "Preview" mode. However we still want them to print the text.
We have put on the page a test button which should enable that icon on the toolbar.
function
EnablePrint()
{
var editor = $find("<%=radChange.ClientID %>");
var oTool = editor.getToolByName("PrintMyText");
oTool.setState(0);
//Enable Tool Icon
oTool.enabled =
true;
}
This enables the button as expected, but the event does not fire (this is a custom print button (from the examples with style sheets)).
Any ideas?
Cheers,
Jonathan
0
Hello Jonathan,
Your code looks fine (actually you do not need the last line oTool.enabled = true;) and it should have worked.
Here is our test - the editor is loaded in Preview mode, and the button is enabled in the OnClientLoad method - and it works just fine.
I am not sure why it would not work on your end. If you are unable to make it work, please open a support ticket and send us a simple project that demonstrates the problem. Once we have it we will get back to you with a solution.
All the best,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Your code looks fine (actually you do not need the last line oTool.enabled = true;) and it should have worked.
Here is our test - the editor is loaded in Preview mode, and the button is enabled in the OnClientLoad method - and it works just fine.
| <telerik:radeditor runat="server" ID="RadEditor1" EditModes="Preview" OnClientLoad="OnClientLoad"> |
| <Tools> |
| <telerik:EditorToolGroup> |
| <telerik:EditorTool Name="PrintMyText" /> |
| <telerik:EditorTool Name="Bold" /> |
| </telerik:EditorToolGroup> |
| </Tools> |
| <Content> |
| Some content here |
| </Content> |
| </telerik:radeditor> |
| <script> |
| Telerik.Web.UI.Editor.CommandList["PrintMyText"] = function(commandName, editor, args) |
| { |
| alert("Hello, world"); |
| }; |
| function OnClientLoad(editor) |
| { |
| var oTool = editor.getToolByName("PrintMyText"); |
| oTool.setState(0); |
| } |
| </script> |
I am not sure why it would not work on your end. If you are unable to make it work, please open a support ticket and send us a simple project that demonstrates the problem. Once we have it we will get back to you with a solution.
All the best,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rick
Top achievements
Rank 1
answered on 10 Apr 2009, 02:50 AM
Hi, is this feature implemented in the Q1 version of 2009? Or not yet?
If not, how can I detect the switch from Design to HTML/Preview mode? I would like to manually enable some buttons when such a switch occurs.
Thanks,
Rick
If not, how can I detect the switch from Design to HTML/Preview mode? I would like to manually enable some buttons when such a switch occurs.
Thanks,
Rick
0
Hi Rick,
You can detect the switch from Design to Html and Preview modes using the code provided in this help article: get_mode.
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
You can detect the switch from Design to Html and Preview modes using the code provided in this help article: get_mode.
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Rick
Top achievements
Rank 1
answered on 13 Apr 2009, 09:14 PM
Perfect! Thanks
