MarkdownExportAsHtml

MarkdownExportAsHtml enumeration

Allows to specify the elements to be exported to Markdown as raw HTML.

[Flags]
public enum MarkdownExportAsHtml

Values

NameValueDescription
None0Export all elements using Markdown syntax without any raw HTML.
Tables1Export tables as raw HTML.

Examples

Shows how to export a table to Markdown as raw HTML.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Writeln("Sample table:");

// Create table.
builder.InsertCell();
builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;
builder.Write("Cell1");
builder.InsertCell();
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
builder.Write("Cell2");

MarkdownSaveOptions saveOptions = new MarkdownSaveOptions();
saveOptions.ExportAsHtml = MarkdownExportAsHtml.Tables;

doc.Save(ArtifactsDir + "MarkdownSaveOptions.ExportTableAsHtml.md", saveOptions);

See Also