devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
11 lines (10 loc) • 415 B
JavaScript
import { ListUtils } from '@devexpress/utils/lib/utils/list';
import { RtfFontInfo } from './rtf-font-info';
export class RtfFontInfoCollection {
defaultRtfFontInfo = RtfFontInfo.createDefaultRtfFontInfo();
collection = [];
getRtfFontInfoById(id) {
const font = ListUtils.elementBy(this.collection, font => font.id == id);
return font ? font : this.defaultRtfFontInfo;
}
}