Search results

Customize the font family drop down in ASP.NET Core DocumentEditor control

20 Jan 2022 / 1 minute to read

Document editor provides an options to customize the font family drop down list values using fontfamilies in Document editor settings. Fonts which are added in fontFamilies of documentEditorSettings will be displayed on font drop down list of text properties pane and font dialog.

Similarly, you can use documentEditorSettings property for DocumentEditor also.

The following example code illustrates how to change the font families in Document editor container.

tagHelper
Copied to clipboard
<ejs-documenteditorcontainer id="container" documentEditorSettings="settings" enableToolbar=true  height="590px"></ejs-documenteditorcontainer>

<script>
var settings = { fontFamilies: ['Algerian', 'Arial', 'Calibri', 'Cambria'] };
</script>

Output will be like below:

Font