How I can set defaut font size and font family for document editor

I want to set default font size is 14 and font family is time new roman for documenteditor.

When I clicl new page it alway Calibri 11

3 Replies 1 reply marked as answer

KB Kurthis Banu Abdul Majeeth Syncfusion Team May 12, 2021 07:29 AM UTC

Hi Tông , 

You can set the default character format for documenteditor instance. No need to change formatting each time while opening new document.  
   
Like below you can change the default formatting of documenteditor:  
   
 let defaultCharacterFormatCharacterFormatProperties = {   
    bold: false,   
    italic: false,   
    baselineAlignment: 'Normal',   
    underline: 'None',   
    fontColor: "#000000",   
    fontFamily: 'Times New Roman',   
    fontSize: 8   
}   
   
// Set default Character format   
container.documentEditor.setDefaultCharacterFormat(defaultCharacterFormat);   
  
   
     
API documentation:   
  
   
Please let us know if you have any questions.  
Regards,  
Kurthis Banu A.  


Marked as answer

TN Tông Nguy?n Ð?c May 12, 2021 08:44 AM UTC

I got it.
Many thanks


KB Kurthis Banu Abdul Majeeth Syncfusion Team May 12, 2021 09:03 AM UTC

Hi Tông, 

Thanks for your update. 

Regards, 
Kurthis Banu A. 


Loader.
Up arrow icon