Setting default input style

Last post 06-03-2013, 12:30 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  05-30-2013, 8:17 PM 77518

    Setting default input style

    If there is a paragraph with black font in editor body, and my user needs to write something among this paragraph, how do I set the default input color (like Red) so that the user do not need to click "Font color" button?

    Is there a way to do that?

  •  05-31-2013, 12:21 PM 77519 in reply to 77518

    Re: Setting default input style

    Hi Sophie315,

     

    You can set property "EditorBodyStyle"to define some default style, like the example below.

     

    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title>example</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <CE:Editor ID="Editor1" runat="server" EditCompleteDocument="true" EditorBodyStyle="color:red">  
    12.         </CE:Editor>  
    13.     </form>  
    14. </body>  
    15. </html>  
     

    Also, you can define it in the external stylesheet, like demo http://cutesoft.net/example/Using-External-Style-Sheets.aspx

     

    Regards,

     

    Ken 

  •  05-31-2013, 12:48 PM 77521 in reply to 77519

    Re: Setting default input style

    Thanks. Ken.

    However, set EditorBodyStyle="color:red" will affect all texts, my problem is, my user will write some comments among a existed paragraph, and this original paragraph's font is black. And my user wants to input the comments with red color without clicking "Font color" button, is there a way to do that?

  •  06-03-2013, 12:30 PM 77523 in reply to 77521

    Re: Setting default input style

    Hi Sophie315,

     

    If it is a exists paragraph, then I suggest you set the inline style for this pargraph by default, so it will use the text color what you set for. but if this new paragraph needs create by the user, then can not achieve the default style for it. Another way is create a custom button for the editor toolbar which use to add this new paragraph, then you can handle the paragraph style, but this way needs the user to click on the custom button to add the new paragraph.

     

    Regards,

     

    Ken 

View as RSS news feed in XML