Re: Any way to suppress the scroll bars in the Editor?

  •  11-09-2011, 6:34 AM

    Re: Any way to suppress the scroll bars in the Editor?

    Hi WilliamK,
     
    Please try the example below. It is the classic asp example
     
    <!-- #include file = "cuteeditor_files/include_CuteEditor.asp" -->
    <html>
    <head>
        <title>ASP Editor Demo</title>
    </head>
    <body>
        <form name="theForm" method="post">
            <div>
                <%   
           Dim editor   
           Set editor = New CuteEditor   
           editor.ID = "Editor1"  
           editor.Text = "Hello World"  
           editor.EditCompleteDocument=true
           editor.Draw()   
                %>
            </div>
              <input type="button" value="scroll on" onclick="scrollOn()" />
            <input type="button" value="scroll off" onclick="scrollOff()" />
        </form>
    </body>
    </html>

    <script>
       function CuteEditor_OnInitialized(editor)      

          {      

              var editdoc = editor.GetDocument();      

              //editdoc.body.scroll="no"; firefox does not support scroll      

              editdoc.body.style.overflow="hidden";      

          }      

          function scrollOn()   

          {   

             var editor1 = document.getElementById('CE_Editor1_ID');

              var editdoc = editor1.GetDocument();    

              editdoc.body.style.overflow="";    

          }   

          function scrollOff()   

          {   

              var editor1 = document.getElementById('CE_Editor1_ID');
     
              var editdoc = editor1.GetDocument();    

              editdoc.body.style.overflow="hidden";    

          }   
    </script>
     
    Regards,
     
    Ken
View Complete Thread