10 Answers, 1 is accepted
0
Hi,
You can check for the current mode using the get_mode() method, get a reference to the desired tools using the getToolByName() method and enable it using the setState(0) method, e.g.
You can find more information at:
http://www.telerik.com/help/aspnet-ajax/setbuttonstate.html
and
http://www.telerik.com/help/aspnet-ajax/editor_get_mode.html
Best wishes,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You can check for the current mode using the get_mode() method, get a reference to the desired tools using the getToolByName() method and enable it using the setState(0) method, e.g.
<telerik:radeditor runat=
"server"
OnClientModeChange=
"OnClientModeChange"
ID=
"RadEditor1"
></telerik:radeditor>
<script type=
"text/javascript"
>
function
OnClientModeChange(editor, args)
{
var
mode = editor.get_mode();
switch
(mode)
{
case
1:
//alert( "We are in Design mode");
//do something
break
;
case
2:
//alert("We are in HTML mode");
break
;
case
4:
setTimeout(
function
()
{
var
tool = editor.getToolByName(
"Print"
);
tool.setState(0);
}, 0);
//alert( "We are in Preview mode");
//do something
break
;
}
}
</script>
You can find more information at:
http://www.telerik.com/help/aspnet-ajax/setbuttonstate.html
and
http://www.telerik.com/help/aspnet-ajax/editor_get_mode.html
Best wishes,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
nono
Top achievements
Rank 1
answered on 30 Dec 2009, 04:58 PM
Thanks! Exactly what i was looking for.
0
Vincent
Top achievements
Rank 1
answered on 22 Mar 2010, 03:24 AM
Hi
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
function showSource(tab, multiPage, editor) { |
editor.set_mode(2); |
showEditorToolbar(true); |
if (multiPage.get_selectedIndex() != 0) |
multiPage.set_selectedIndex(0); |
var oTool = getEditor().getToolByName("FontName"); //get a reference to the custom tool |
oTool.setState(0); |
} |
0
Vincent
Top achievements
Rank 1
answered on 22 Mar 2010, 03:26 AM
Hi
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
function showSource(tab, multiPage, editor) { |
editor.set_mode(2); |
showEditorToolbar(true); |
if (multiPage.get_selectedIndex() != 0) |
multiPage.set_selectedIndex(0); |
var oTool = getEditor().getToolByName("FontName"); //get a reference to the custom tool |
oTool.setState(0); |
} |
0
Vincent
Top achievements
Rank 1
answered on 22 Mar 2010, 03:27 AM
Hi
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
function showSource(tab, multiPage, editor) { |
editor.set_mode(2); |
showEditorToolbar(true); |
if (multiPage.get_selectedIndex() != 0) |
multiPage.set_selectedIndex(0); |
var oTool = getEditor().getToolByName("FontName"); //get a reference to the custom tool |
oTool.setState(0); |
} |
0
Vincent
Top achievements
Rank 1
answered on 22 Mar 2010, 03:37 AM
Hi
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
I just encounter the same problem. When I change my editor to html view, I want to enable the "FontName", it seems dropdown stop working. I can see any value.
function showSource(tab, multiPage, editor) { |
editor.set_mode(2); |
showEditorToolbar(true); |
if (multiPage.get_selectedIndex() != 0) |
multiPage.set_selectedIndex(0); |
var oTool = getEditor().getToolByName("FontName"); //get a reference to the custom tool |
oTool.setState(0); |
} |
0
Afroz khan
Top achievements
Rank 1
answered on 16 Jul 2014, 02:38 PM
Hi Rumen,
When i click on toggle button , editor allow to edit the content , could you please check what can be the better solution?
When i click on toggle button , editor allow to edit the content , could you please check what can be the better solution?
0
Hi Afroz,
The discussed matter in this thread is to enable the Print tool in the Preview mode.
Due to that I can only assume how the toggle button (I assume the Toggle Full Screen Mode) is related to the RadEditor Edit modes and how the Rumen's suggestion is related to the full screen.
When toggling the full screen it is expected the editor to be editable.
Could you please provide more details about your concerns, so that I could better understand the encountered issue.
Regards,
Ianko
Telerik
The discussed matter in this thread is to enable the Print tool in the Preview mode.
Due to that I can only assume how the toggle button (I assume the Toggle Full Screen Mode) is related to the RadEditor Edit modes and how the Rumen's suggestion is related to the full screen.
When toggling the full screen it is expected the editor to be editable.
Could you please provide more details about your concerns, so that I could better understand the encountered issue.
Regards,
Ianko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Afroz khan
Top achievements
Rank 1
answered on 07 Aug 2014, 02:19 PM
I have set the editor on preview mode becuase i dont want to allow editable to it , but to read the content i allow toggle mode but it allowing editing the content
0
Hello Afroz,
The described matter does not sound related to the forum thread to me.
Due to that, I would like to ask you to open a proper support ticket to us and provide more details about your requirements and how the RadEditor control has been customized up to this point, so that we could properly investigate the described case and assist you on achieving the expected behavior.
Regards,
Ianko
Telerik
The described matter does not sound related to the forum thread to me.
Due to that, I would like to ask you to open a proper support ticket to us and provide more details about your requirements and how the RadEditor control has been customized up to this point, so that we could properly investigate the described case and assist you on achieving the expected behavior.
Regards,
Ianko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.