devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
10 lines (9 loc) • 629 B
JavaScript
import { RichUtils } from '../../../../../../common/model/rich-utils';
import { TranslationTables } from '../../../translation-table/translation-tables';
import { LeafElementDestination } from '../destination';
export class RunBreakDestination extends LeafElementDestination {
async processElementOpen(reader) {
const breakCharacterAsCode = this.data.readerHelper.getWpEnumValue(reader, 'type', TranslationTables.runBreaksTable.importMap, RichUtils.specialCharacters.LineBreak.charCodeAt(0));
this.data.subDocumentInfo.characterImporter.insertText(String.fromCharCode(breakCharacterAsCode));
}
}