Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Customizing WebHTMLEditor Line Breaks
posted

I am using the WebHTMLEditor control and setting the UseLineBreak property to false so that <P> tags are inserted when the user presses the Enter key. Is there any way of applying a custom default style to these <P> tags, so that when the user presses the Enter key the formatted <P> tag gets inserted?

For example, if i don't want the margins surrounding each paragraph i would want the following as the default tag:

<P style="MARGIN:0px; PADDING:0px">

Parents
  • 37874
    posted

    Hello nick_clarke,

    It has been some time since your post but in case that you still need assistance I will be happy to help.

    In order to apply styles to the paragraph elements in WebHtmlEditor, I would suggest that you set its CssClass property and then add the necessary styles to all paragraphs within elements of this CSS class:

        <style type="text/css">

            .myClass p

            {

                margin: 0px;

                padding: 0px;

            }

        </style>

    Please let me know if this helps.


Reply Children
No Data