changing editor mode to preview mode

2 posts, 0 answers
  1. Sigma
    Sigma avatar
    87 posts
    Member since:
    Apr 2012

    Posted 22 Oct 2012 Link to this post

    hii,
    how can i change the editor mode to preview mode in the client
    side?

    thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Oct 2012 Link to this post

    Hi Sigma,

    Try the following code snippet to change the RadEditor mode.

    ASPX:
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" OnClientClick="OnClientClick()" />

    JS:
    <script type="text/javascript">
        function OnClientClick() {
            var editor = $find("<%= RadEditor1.ClientID %>");
            editor.set_mode(4);
        }
    </script>

    Hope this helps.

    Regards,
    Shinu.
Back to Top