MarkdownTocOptions
OfficeIMO.Markdown
Options controlling TOC generation.
Inheritance
- object
- MarkdownTocOptions
Usage
Explore 12 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters 12
- Method MarkdownBodyRenderContext.BuildTocEntries
- Method MarkdownBodyRenderContext.GetPrecedingHeadingAnchor
- Method MarkdownDocument.Toc
- Method MarkdownDocument.TocHere
- Method MarkdownInlineHtmlRenderContext.BuildTocEntries
- Method MarkdownInlineHtmlRenderContext.GetPrecedingHeadingAnchor
- Method MarkdownInlineMarkdownRenderContext.BuildTocEntries
- Method MarkdownInlineMarkdownRenderContext.GetPrecedingHeadingAnchor
- Method MarkdownTocHtmlRenderer.BeginInvoke
- Method MarkdownTocHtmlRenderer.Invoke
- Method MarkdownWriteContext.BuildTocEntries
- Method MarkdownWriteContext.GetPrecedingHeadingAnchor
Constructors
public MarkdownTocOptions() #Inherited Methods
Properties
public bool Ordered { get; set; } #When true, generates an ordered list; otherwise unordered (default).
public bool IncludeTitle { get; set; } #Include a title heading above the TOC (default true).
public string Title { get; set; } #Title text (default "MarkdownTable of Contents").
public MarkdownTocScope Scope { get; set; } #Limits TOC scope. Document = all headings; PreviousHeading = only headings under the nearest preceding heading; HeadingTitle = headings under the named heading.
public string? ScopeHeadingTitle { get; set; } #For Scope=HeadingTitle, the heading text to scope under (case-insensitive).
public bool Collapsible { get; set; } #Render the TOC inside a collapsible HTML <details> element (HTML output only).
public bool Collapsed { get; set; } #When MarkdownTocOptions.Collapsible is true, render the TOC collapsed by default.
public MarkdownTocLayout Layout { get; set; } #Visual layout variant for HTML rendering. Default MarkdownTocLayout.List (legacy plain list).
public bool ScrollSpy { get; set; } #Enable ScrollSpy behavior (highlight active heading link while scrolling). HTML output only.
public bool Sticky { get; set; } #When true, the TOC container becomes sticky (position: sticky) with a small top offset.
public string? AriaLabel { get; set; } #Optional ARIA label for the navigation container. Default: "MarkdownTable of Contents".
public int? WidthPx { get; set; } #Optional sidebar width in pixels for SidebarLeft/SidebarRight layouts. Default 260.
public MarkdownTocChrome Chrome { get; set; } #Visual chrome for the TOC container: None, Outline, Panel, or Default.
public bool HideOnNarrow { get; set; } #When true, hides the sidebar TOC completely on narrow screens (width up to 1000px).
public bool RequireTopLevel { get; set; } #When true, ensure the top-level (MarkdownH1) is included even if a deeper MinLevel was specified. Helps avoid unreadable TOCs that start at MarkdownH2/MarkdownH3 without their parent context.
public bool NormalizeToMinLevel { get; set; } #When true (default), the visual indentation of TOC items is normalized so that the minimum included heading level aligns as the root. When false, indentation reflects absolute heading levels (MarkdownH1 root).