We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Default rte font

How to set default font of rich text editor, like Arial instead of Times New Roman?
Thank you

3 Replies

PO Prince Oliver Syncfusion Team April 9, 2019 10:18 AM UTC

Hello Mihael, 
 
Thank you for contacting us. 
 
You can set the default font in RTE to “Arial” instead of “Times New Roman”  through importing modified styles from an external stylesheet into RTE. To load stylesheet inside iframe you can use externalCSS property. Kindly refer to the following code 
 
<div id="ControlRegion"> 
    <div> 
        @{Html.EJ().RTE("rteSample").Height("380px").ContentTemplate(@<div> 
    <p><b>Description:</b></p> 
    <p> 
        The Rich Text Editor (RTE) control is an easy to render in 
        client side. Customer easy to edit the contents and get the HTML content for 
        the displayed content. A rich text editor control provides users with a toolbar 
        that helps them to apply rich text formats to the text entered in the text 
        area. 
    </p> 
</div>).MinWidth("200px").ExternalCSS("../Content/ej/iframe.css").Render();} 
  </div> 
</div> 
 
Iframe.CSS: 
body { 
   font-family:Arial; 
} 
 
We have attached an example for your reference, please find it in the following location: 
 
For further reference on setting default font styles, please refer the following UG documentation: 
 
Let us know if you need any further assistance on this. 
 
Regards, 
Prince 



MI Mihael April 9, 2019 10:57 AM UTC

Thank you very much, it is working.


PO Prince Oliver Syncfusion Team April 9, 2019 11:03 AM UTC

Hello Mihael, 

Most welcome. We are glad to help you. 

Regards, 
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon