This is a migrated thread and some comments may be shown as answers.

Preset the fontsize and boldness

2 Answers 13 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ewgenij
Top achievements
Rank 1
Veteran
Ewgenij asked on 01 Apr 2021, 01:37 PM
I want the text in the editor to be initially of a specified font size and bold. How can I achieve that?

2 Answers, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 02 Apr 2021, 02:12 PM

Hello Ewgenij,

In order to preset the font-size and the font-weight of the Kendo UI Editor content, take the took at the Style encapsulation article. By setting the iframe property to false, use the following CSS snippet:

.k-editor-content {
  font-weight: bold;
  font-size: 10px;
}

In this StackBlitz example, I have preset the font of the Editor content. Please make sure to set the encapsulation to ViewEncapsulation.None to set the style locally.

I hope this helps. Let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Ewgenij
Top achievements
Rank 1
Veteran
answered on 06 Apr 2021, 09:32 AM

Hello, thank you for your advice. However, if I do it like that the fontsize and boldness are not stored in the model. I get the required fontsize and boldness in the editor view only, not in the result at the end. So, it's a violation of What-You-See-Is-What-You-Get. I see not the same thing I get as output.

What I wanted to have was that the text is also stored in the model in the selected fontsize and boldness. Is that possible?

Tags
Editor
Asked by
Ewgenij
Top achievements
Rank 1
Veteran
Answers by
Hetali
Telerik team
Ewgenij
Top achievements
Rank 1
Veteran
Share this question
or