The requested page is not available for the requested platform. You are viewing the content for Default platform.

Font Class

Defines a font in the document.

Declaration

export class Font

Properties

cssName Property

Returns a name of the font's CSS class.

Declaration

readonly cssName: string

Property Value

Type Description
string

The CSS class name.

name Property

Returns a name of the font.

Declaration

readonly name: string

Property Value

Type Description
string

The font name.

Methods

delete Method

Deletes the current font.

Declaration

delete(): void

Remarks

//reduces the document's font collection to the specified fonts
var myFonts = ['Arial', 'Calibri'];
richEdit.document.fonts.getAllFontNames().forEach(fontName => 
    myFonts.find(myFontName => 
        myFontName == fontName) ? null : richEdit.document.fonts.getByName(fontName).delete());