Re: Override Insert Page Break Styling

  •  10-09-2013, 1:16 PM

    Re: Override Insert Page Break Styling

    Hi CTietgen,

     

    You can catch the page break command and change it to your own logic, like the example below. It will insert the <div>- Page Break -</div> when you click on the page break button.

     

    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>  
    4.   
    5.   
    6. <html>  
    7. <head>  
    8.     <title>example </title>  
    9. </head>  
    10. <body>  
    11.     <form id="Form1" runat="server">  
    12.         <CE:Editor ID="Editor1" runat="server">  
    13.         </CE:Editor>  
    14.         <script type="text/javascript">  
    15.         function CuteEditor_OnCommand(editor,command,ui,value)  
    16.          {  
    17.             //handle the command by yourself  
    18.            if(command=="InsertPageBreak")  
    19.            {  
    20.                 editor.PasteHTML("<div>- Page Break -</div>");  
    21.                 return true;  
    22.            }  
    23.         }  
    24.         </script>  
    25.     </form>  
    26. </body>  
    27. </html>  
     

    Regards,

     

    Ken 

     

View Complete Thread