md2hwp
Version:
Convert Markdown to HWP (Hangul Word Processor) format
37 lines (36 loc) • 799 B
TypeScript
export interface Md2HwpOptions {
title?: string;
author?: string;
pageWidth?: number;
pageHeight?: number;
marginLeft?: number;
marginRight?: number;
marginTop?: number;
marginBottom?: number;
}
export interface HwpContent {
type: 'paragraph' | 'heading' | 'list' | 'table' | 'code' | 'image';
level?: number;
content?: string;
children?: HwpContent[];
style?: TextStyle;
rows?: TableRow[];
language?: string;
src?: string;
alt?: string;
}
export interface TextStyle {
bold?: boolean;
italic?: boolean;
underline?: boolean;
fontSize?: number;
color?: string;
}
export interface TableRow {
cells: TableCell[];
}
export interface TableCell {
content: string;
colSpan?: number;
rowSpan?: number;
}