dip s

dip s

  • 1.8k
  • 167
  • 5.1k

Set default font name,size to syncfusion richtext editor's source code

Oct 21 2020 4:33 AM
In Angular 6, I have used a sync-fusion rich text editor(RTE). I have set font name and size to it as follows.
  1. <ejs-richtexteditor style="resize : none; font-family: Verdana; font-size : 10pt;" name="Symptoms" class="form-control " id="Symptoms" rows="5" cols="25" >  
e.g. my RTE contains text/data as "This is testing template". If I click on source code button of RTE then it shows like
  1. <p>This is testing template</p>  
Means, though I have set font name and size to RTE , it does not reflect in source code. What I want is like it should show me source code as,
  1. <p><span style="font-family: Verdana;"><span style="font-size: 10pt;">This is testing template</span></span></p>  
To show like above source code, I have to do "select All" content of RTE and then set font and size explicitly by clicking on font and font size buttons on RTE. Then only I get style tag attached. So, I have to always select all contents of RTE and then set font and size which is very hectic. So, how can I set the same by default in source code of RTE. Thank you in advance.

Answers (4)