UNPKG

gn-rtf.js

Version:

Render RTF documents in HTML. This also includes rendering WMF and EMF images which are often contained in RTF documents.

32 lines (31 loc) 1.03 kB
import { Document } from "../Document"; import { RenderChp } from "./RenderChp"; import { RenderPap } from "./RenderPap"; export interface IContainerElement { element: HTMLElement; content: HTMLElement; } export declare class Renderer { _doc: Document; private _dom; private _curRChp; private _curRPap; private _curpar; private _cursubpar; private _curcont; constructor(doc: Document); pushContainer(contel: IContainerElement): void; popContainer(): void; buildHyperlinkElement(url: string): HTMLElement; _appendToPar(el: HTMLElement, newsubpar?: boolean): void; startPar(): void; lineBreak(): void; setChp(rchp: RenderChp): void; setPap(rpap: RenderPap): void; appendElement(element: HTMLElement): void; buildRenderedPicture(element: HTMLElement): HTMLElement; renderedPicture(element: HTMLElement): void; buildPicture(mime: string, data: string): HTMLElement; picture(mime: string, data: string): void; buildDom(): HTMLElement[]; }