Hi rezagc,
You can change the editor height dynamically when the user switch to preview. The example below shows you how to achieve it.
- <%@ Page Language="C#" %>
-
- <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
- <html>
- <head>
- <title>example </title>
- </head>
- <body>
- <form id="Form1" runat="server">
- <CE:Editor ID="Editor1" runat="server" Height="500">
- </CE:Editor>
- </form>
- </body>
- </html>
-
- <script>
- function changeHeight(custom_height)
- {
- var editor1=document.getElementById("<%= Editor1.ClientID %>");
- editor1.SetHeight(custom_height);
- }
- function CuteEditor_OnCommand(editor,command,ui,value)
- {
- if(command=="TabView")
- {
- setTimeout("changeHeight(650)",200);
- }
- if(command=="TabCode"||command=="TabEdit")
- {
- setTimeout("changeHeight(500)",200);
- }
- }
- </script>
Regards,
Ken