This version of the module is deprecated: Use moonbitlang/docx2html instead
bobzhang/docx2html/document does not have a README file
pub(all) struct Comment {
comment_id : String
body : Array[DocumentElement]
author_name : String
author_initials : String
} derive(Eq, Debug)pub(all) enum DocumentElement {
Document(Array[DocumentElement], Array[Note], Array[Comment])
Paragraph(Array[DocumentElement], ParagraphProperties)
Run(Array[DocumentElement], RunProperties)
Text(String)
Tab
Checkbox(Bool)
Hyperlink(Array[DocumentElement], String?, String?, String?)
NoteReference(String, String)
CommentReference(String)
Image(Image)
Table(Array[DocumentElement], TableProperties)
TableRow(Array[DocumentElement], Bool)
TableCell(Array[DocumentElement], Int, Int)
Break(BreakType)
BookmarkStart(String)
} derive(Eq, Debug)pub(all) struct Note {
note_type : String
note_id : String
body : Array[DocumentElement]
} derive(Eq, Debug)pub(all) struct RunProperties {
style_id : String?
style_name : String?
is_bold : Bool
is_underline : Bool
is_italic : Bool
is_strikethrough : Bool
is_all_caps : Bool
is_small_caps : Bool
vertical_alignment : VerticalAlignment
font : String?
font_size : Int?
highlight : String?
} derive(Eq, Debug)fn comment(comment_id : String, body : Array[DocumentElement], author_name? : String, author_initials? : String) -> Commentfn document(children : Array[DocumentElement], notes? : Array[Note], comments? : Array[Comment]) -> DocumentElementfn document_descendants_where(element : DocumentElement, predicate : (DocumentElement) -> Bool) -> Array[DocumentElement]fn hyperlink(children : Array[DocumentElement], href? : String?, anchor? : String?, target_frame? : String?) -> DocumentElementfn paragraph(children : Array[DocumentElement], properties? : ParagraphProperties) -> DocumentElementfn paragraph_properties(style_id? : String?, style_name? : String?, numbering? : Numbering?, alignment? : String?, indent? : Indent) -> ParagraphPropertiesfn run_properties(style_id? : String?, style_name? : String?, is_bold? : Bool, is_underline? : Bool, is_italic? : Bool, is_strikethrough? : Bool, is_all_caps? : Bool, is_small_caps? : Bool, vertical_alignment? : VerticalAlignment, font? : String?, font_size? : Int?, highlight? : String?) -> RunPropertiesfn table_cell(children : Array[DocumentElement], col_span? : Int, row_span? : Int) -> DocumentElementfn transform_elements(element : DocumentElement, transform : (DocumentElement) -> DocumentElement) -> DocumentElementfn transform_paragraphs(transform : (DocumentElement) -> DocumentElement) -> ((DocumentElement) -> DocumentElement)fn transform_runs(transform : (DocumentElement) -> DocumentElement) -> ((DocumentElement) -> DocumentElement)Install
Download zipNative MoonBit DOCX to HTML/Markdown converter ported from Mammoth