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

[Solved] How to hide Editor Tool during preview

2 Answers 177 Views
Editor
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 24 Sep 2009, 07:38 PM

Hi, is there a property to hide Editor Tool during preview?
Is it possible also to replace it with custom text?

 

Thanks,

RJ

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 25 Sep 2009, 10:42 AM
Hello,

You could try the client side code shown below in order to hide the ToolBar when Editor in Preview mode.

ASPX:
 
<telerik:RadEditor ID="RadEditor1" OnClientModeChange="OnClientModeChange" runat="server"
</telerik:RadEditor> 

JavaScript:
 
<script type='text/javascript'
function OnClientModeChange(sender, args) 
    if(sender.get_mode()==4) // Checking the mode, where mode 4 is Preview 
    { 
        sender.get_toolContainer().style.display = "none"// Hide ToolBar 
    } 
    else 
    { 
        sender.get_toolContainer().style.display = "block"// Show ToolBar 
    }     
</script> 

-Shinu.
0
RJ
Top achievements
Rank 1
answered on 25 Sep 2009, 12:04 PM
Thank you very much Shinu
Tags
Editor
Asked by
RJ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
RJ
Top achievements
Rank 1
Share this question
or