UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

19 lines (18 loc) 817 B
import { isDefined } from "@devexpress/utils/lib/utils/common"; import { LeafElementDestination } from "../destination"; export class NoteReferenceDestination extends LeafElementDestination { processCustomNoteRun(subDocId) { this.data.subDocumentInfo.characterImporter.noteDocumentId = subDocId; } async processElementOpen(reader) { const id = reader.getAttributeNS("id", this.data.constants.wordProcessingNamespaceConst); let subDocId = this.notes[id]; if (!isDefined(subDocId)) return; const customMarkFollows = this.data.readerHelper.getWpSTOnOffValue(reader, "customMarkFollows", false); if (customMarkFollows) this.processCustomNoteRun(subDocId); else this.insertNoteRun(subDocId); } }