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
80
Padding for UltraTextEditor
posted

I have a requirement to add 10px padding (10px white-space) before the text appears in UltraTextEditor control. I do not see any padding property for this control. How do I achieve this? 

  • 1980
    Offline posted

    Hello hsudesh,

    The easiest way I can think of is to set the padding of the text in the Ultra TextEditor by using the PadLeft() method. The method applies a padding on the left (before the entered text) with the specified Unicode symbol for the specified length.

    var paddingText = this.ultraTextEditor1.Text.PadLeft(10, ' ');
    this.ultraTextEditor1.Text = paddingText + "Sample Text”;