New to Kendo UI for AngularStart a free 30-day trial

Setting the Default Font Family and Size in the Editor

Environment

ProductProgress® Kendo UI® for Angular Editor

Description

I want to set a default font family and font size in the Kendo UI for Angular Editor upon initialization. How can I achieve this?

Solution

To set the default font family and font size for the Kendo UI for Angular Editor, use the exec method of the Editor. The exec method allows you to execute a command on the Editor's content. You can use the fontFamily and fontSize commands to set the desired font family and font size.

A table with the default font families that are available in the Editor:

Font NameFull Font Name for Exec
ArialArial, "Helvetica Neue", Helvetica, sans-serif
Courier New"Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace
GeorgiaGeorgia, Times, "Times New Roman", serif
ImpactImpact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif
Lucida Console"Lucida Console", "Lucida Sans Typewriter", monaco, "Bitstream Vera Sans Mono", monospace
TahomaTahoma, Verdana, Segoe, sans-serif
Times New RomanTimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif
Trebuchet MS"Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif
VerdanaVerdana, Geneva, sans-serif

The following example demonstrates how to set the default font family and font size in the Editor.

A delay is used in this example to ensure that the Editor is initialized before the exec method is called.

Change Theme
Theme
Loading ...

See Also

In this article
EnvironmentDescriptionSolutionSee Also
Not finding the help you need?
Contact Support