UNPKG

@publiwrite/html-to-epub

Version:

A library to generate EPUB from HTML. Inspired by epub-gen.

61 lines (60 loc) 1.48 kB
export interface EpubContentOptions { title: string; data: string; url?: string; author?: Array<string> | string; filename?: string; excludeFromToc?: boolean; beforeToc?: boolean; ornamentalBreakElement?: string; } export interface EpubOptions { title: string; description: string; cover?: string; publisher?: string; author?: Array<string> | string; tocTitle?: string; appendChapterTitles?: boolean; date?: string; lang?: string; css?: string; fonts?: Array<string>; content: Array<EpubContentOptions>; customOpfTemplatePath?: string; customNcxTocTemplatePath?: string; customHtmlTocTemplatePath?: string; customHtmlCoverTemplatePath?: string; customHtmlContentTemplatePath?: string; version?: number; userAgent?: string; verbose?: boolean; tempDir?: string; } export interface EpubContent { id: string; href: string; title: string; ornamentalBreakPath: string | null; data: string; url: string | null; author: Array<string>; filePath: string; templatePath: string; excludeFromToc: boolean; beforeToc: boolean; } export interface EpubImage { id: string; url: string; dir: string; mediaType: string; extension: string; } export interface ProcessHtmlOptions { allowedAttributes: string[]; allowedXhtml11Tags: string[]; images: EpubImage[]; version: number; verbose?: boolean; }