HeadingLevelOffset
ConvertOptions.HeadingLevelOffset property
Gets or sets the offset to apply to all heading levels in the Markdown output. A value of 2 turns # into ###, ## into ####, etc. Heading levels are clamped to the range 1-6.
public int HeadingLevelOffset { get; set; }
Property Value
Default is 0 (no change).
Remarks
This is useful when you are embedding the converted Markdown inside a larger document where top-level headings are already in use. For example, setting this to 1 ensures the converted content starts at ## instead of #.
Examples
Shift all headings down by one level so that source H1 becomes Markdown ##:
var options = new ConvertOptions { HeadingLevelOffset = 1 };
string markdown = MarkdownConverter.ToMarkdown("document.docx", options);
See Also
- class ConvertOptions
- namespace GroupDocs.Markdown
- assembly GroupDocs.Markdown