Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeHtmlMarkdownOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Markdown.Html.HtmlMarkdownExportOptions

Creates native HTML-to-Markdown import and writer settings without converting or writing files.

Syntax

New-OfficeHtmlMarkdownOptions
[-Base64ImageHandling <Include|Skip|SaveToFile>]
[-Base64ImageOutputDirectory <String>]
[-BaseOptions <HtmlMarkdownExportOptions>]
[-BaseUri <String>]
[-DropUnsupportedBlocks]
[-DropUnsupportedInlineHtml]
[-ImageRenderingMode <RichMarkdown|PortableMarkdown|Html>]
[-IncludeDocumentChrome]
[-LineEnding <LF|CRLF|CR>]
[-ListingCardMetadataMode <Preserve|SuppressInRepeatedCards>]
[-MaxInputCharacters <Int32>]
[-MaxTableExpandedColumns <Int32>]
[-Portable]
[-PreserveScriptsAndStyles]
[-UnorderedListMarker <-|*|+>]
[-WriteOptions <MarkdownSaveOptions>]
[-WriteProfile <OfficeIMO|Portable|HtmlImage>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Convert HTML using a portable Markdown profile.

$options = New-OfficeHtmlMarkdownOptions -Portable -LineEnding LF
Convert-OfficeDocument -Path ./Report.html -To Markdown -OutputPath ./Report.md -Options $options

Parameters

-Base64ImageHandling MarkdownHtmlBase64ImageHandling optional
How data URI images are represented in Markdown.
Possible values: Include, Skip, SaveToFile
-Base64ImageOutputDirectory String optional
Literal image extraction directory; creating options does not create it.
-BaseOptions HtmlMarkdownExportOptions optional
Native settings to copy before applying explicit changes.
-BaseUri String optional
Absolute base URI for relative links and images.
-DropUnsupportedBlocks SwitchParameter optional
Convert unsupported block elements to their child content instead of retaining raw HTML.
-DropUnsupportedInlineHtml SwitchParameter optional
Convert unsupported inline elements instead of retaining raw HTML.
-ImageRenderingMode MarkdownImageRenderingMode optional
How the Markdown writer serializes images.
Possible values: RichMarkdown, PortableMarkdown, Html
-IncludeDocumentChrome SwitchParameter optional
Include the complete HTML document instead of only its body.
-LineEnding OfficeLineEnding optional
Output line endings.
Possible values: LF, CRLF, CR
-ListingCardMetadataMode MarkdownHtmlListingCardMetadataMode optional
Preserve or suppress repeated listing-card metadata.
Possible values: Preserve, SuppressInRepeatedCards
-MaxInputCharacters Int32 optional
Maximum accepted HTML input characters; null removes a copied limit.
-MaxTableExpandedColumns Int32 optional
Maximum columns after expanding HTML table spans.
-Portable SwitchParameter optional
Start with the native portable profile instead of the OfficeIMO profile.
-PreserveScriptsAndStyles SwitchParameter optional
Retain script and style elements in the generated Markdown.
-UnorderedListMarker String optional
Unordered list marker.
Possible values: -, *, +
-WriteOptions MarkdownSaveOptions optional
Native Markdown writer settings to copy.
-WriteProfile OfficeMarkdownWriteProfile optional
Start with a named Markdown writer profile.
Possible values: OfficeIMO, Portable, HtmlImage

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.