ListItem
OfficeIMO.Markdown
List item content; supports plain and task (checklist) items.
Inheritance
- MarkdownObject
- ListItem
Usage
Explore 10 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.
Returned or exposed by 9
- Method ListItem.Link
- Method ListItem.Task
- Method ListItem.TaskInlines
- Method ListItem.Text
- Method MarkdownDocument.DescendantListItems
- Property MarkdownNativeListItem.Item
- Method MarkdownUnorderedList.Add
- Property OrderedListBlock.Items
- Property UnorderedListBlock.Items
Accepted by parameters 1
- Method MarkdownUnorderedList.Add
Constructors
public ListItem(InlineSequence content) #Creates a plain list item.
Parameters
- content OfficeIMO.Markdown.InlineSequence
Methods
public static ListItem Link(string text, string url, string? title = null) #Creates a link item.
Parameters
- text string
- url string
- title string? = null
Returns
ListItempublic static ListItem Task(string text, bool done = false) #Creates a task (checklist) item.
Parameters
- text string
- done bool = false
Returns
ListItempublic static ListItem TaskInlines(InlineSequence content, bool done = false) #Creates a task (checklist) item using inline content.
Parameters
- content OfficeIMO.Markdown.InlineSequence
- Inline content for the list item. When null, an empty sequence is used.
- done bool = false
- Whether the task should be marked as completed.
Returns
ListItemInherited Methods
public void Accept(MarkdownVisitor visitor) #Parameters
- visitor MarkdownVisitor
public IEnumerable<MarkdownObject> Ancestors() #Returns
IEnumerable<MarkdownObject>public IEnumerable<MarkdownObject> AncestorsAndSelf() #Returns
IEnumerable<MarkdownObject>public IEnumerable<TObject> DescendantObjectsOfType<TObject>() #Type Parameters
- TObject
Returns
IEnumerable<TObject>public IEnumerable<MarkdownObject> Descendants() #Returns
IEnumerable<MarkdownObject>Properties
public List<InlineSequence> AdditionalParagraphs { get; } #Additional paragraphs inside the list item (multi-paragraph list items).
public IReadOnlyList<ParagraphBlock> ParagraphBlocks { get; } #MarkdownParagraph blocks owned by this list item. This exposes list-item paragraph content as blocks for AST-style consumers.
public List<IMarkdownBlock> NestedBlocks { get; } #Nested block content inside the list item (e.g., nested ordered/unordered lists, code blocks).
public IReadOnlyList<IMarkdownBlock> ChildBlocks { get; } #Ordered AST-style view of all list-item child blocks, including lead paragraphs.
public MarkdownSourceSpan? MarkerSourceSpan { get; internal set; } #Source span of the list marker token (-, *, +, 1., or 1)) when parsed from markdown.
public string? MarkerText { get; internal set; } #Exact list marker token (-, *, +, 1., or 1)) when parsed from markdown.
public MarkdownSourceSpan? TaskMarkerSourceSpan { get; internal set; } #Source span of the task marker token ([ ], [x], or [X]) when parsed from markdown.
public string? TaskMarkerText { get; internal set; } #Exact task marker token ([ ], [x], or [X]) when parsed from markdown.
public int Level { get; set; } #Indentation level (0 = top-level). Used for nested lists.
public bool ForceLoose { get; set; } #Forces paragraph-wrapped loose rendering even when only the first paragraph and child blocks exist.
Inherited Properties
public MarkdownSourceSpan? SourceSpan { get; internal set; } #public IReadOnlyList<MarkdownObject> ChildObjects { get; } #