ExportAsHtml

MarkdownSaveOptions.ExportAsHtml property

يسمح بتحديد العناصر التي سيتم تصديرها إلى Markdown بصيغة HTML خام. القيمة الافتراضية هيNone .

public MarkdownExportAsHtml ExportAsHtml { get; set; }

أمثلة

يوضح كيفية تصدير جدول إلى Markdown بصيغة HTML الخام.

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

builder.Writeln("Sample 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);

أنظر أيضا