API Reference
VisNetworkHtmlNode
Represents a VisNetwork node with full HTML support using the visjs-html-nodes plugin. This allows for rich HTML content in nodes including divs, spans, lists, tables, images, and more. Note: This requires the visjs-html-nodes plugin to be loaded. When using this node type, the VisNetworkHtmlNodes library will be automatically registered.
Inheritance
- Object
- VisNetworkHtmlNode
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method VisNetworkHtmlNode.WithBadge
- Method VisNetworkHtmlNode.WithBadge
- Method VisNetworkHtmlNode.WithBadge
- Method VisNetworkHtmlNode.WithCard
- Method VisNetworkHtmlNode.WithCard
- Method VisNetworkHtmlNode.WithHtmlBuilder
- Method VisNetworkHtmlNode.WithHtmlContent
- Method VisNetworkHtmlNode.WithImage
- Method VisNetworkHtmlNode.WithList
- Method VisNetworkHtmlNode.WithProgressBar
- Method VisNetworkHtmlNode.WithProgressBar
- Method VisNetworkHtmlNode.WithStatus
- Method VisNetworkHtmlNode.WithTable
Accepted by parameters
- Method VisNetwork.AddHtmlNode
Constructors
public VisNetworkHtmlNode(String id) #Initializes a new instance of the VisNetworkHtmlNode class.
Parameters
- id System.String
- The unique identifier for the node
Methods
GetHtmlContent() #Gets the HTML content for this node.
public VisNetworkHtmlNode WithBadge(String text, TablerColor backgroundColor, Nullable<TablerColor> textColor = null) #VisNetworkHtmlNodeCreates a badge/tag style node.
Parameters
- text System.String
- The badge text
- backgroundColor System.String = null
- The background color
- textColor System.String = null
- The text color
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithBadge(String text) #VisNetworkHtmlNodeCreates a badge/tag style node using the default primary color.
Parameters
- text System.String
public VisNetworkHtmlNode WithBadge(String text, String backgroundColor) #VisNetworkHtmlNodeEditorBrowsable(2)Creates a badge/tag style node using a raw background color and default text color.
Parameters
- text System.String
- backgroundColor System.String
WithBadge(System.String text, HtmlForgeX.TablerColor backgroundColor, System.Nullable{HtmlForgeX.TablerColor} textColor) #Creates a badge/tag style node using typed Tabler colors.
Parameters
- text System.String
- backgroundColor HtmlForgeX.TablerColor
- textColor System.Nullable{HtmlForgeX.TablerColor}
public VisNetworkHtmlNode WithCard(String header, String body, TablerColor headerColor) #VisNetworkHtmlNodeCreates a card-style node with header and body sections.
Parameters
- header System.String
- The header content
- body System.String
- The body content
- headerColor System.String
- Optional header background color
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithCard(String header, String body) #VisNetworkHtmlNodeCreates a card-style node with header and body sections.
Parameters
- header System.String
- body System.String
WithCard(System.String header, System.String body, HtmlForgeX.TablerColor headerColor) #Creates a card-style node with a typed Tabler header color.
Parameters
- header System.String
- body System.String
- headerColor HtmlForgeX.TablerColor
public VisNetworkHtmlNode WithHtmlBuilder(Action<VisNetworkHtmlBuilder> builderAction) #VisNetworkHtmlNodeEditorBrowsable(2)Builds a custom HTML content using a fluent builder.
Parameters
- builderAction System.Action{HtmlForgeX.VisNetworkHtmlBuilder}
- The action to configure the HTML builder
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithHtmlContent(String html) #VisNetworkHtmlNodeEditorBrowsable(2)Sets the raw HTML content for the node. This allows complete control over the node's HTML structure.
Parameters
- html System.String
- The HTML content
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithImage(String imageUrl, String caption = null, Nullable<Int32> width = null, Nullable<Int32> height = null) #VisNetworkHtmlNodeCreates an image node with optional caption.
Parameters
- imageUrl System.String
- The URL of the image
- caption System.String = null
- Optional caption text
- width System.Nullable{System.Int32} = null
- Optional width in pixels
- height System.Nullable{System.Int32} = null
- Optional height in pixels
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithList(String title, String[] items, Boolean ordered = false) #VisNetworkHtmlNodeCreates a list-style node with items.
Parameters
- title System.String
- The title of the list
- items System.String[]
- The list items
- ordered System.Boolean = false
- Whether to use ordered list (numbers) or unordered (bullets)
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithProgressBar(String label, Int32 percentage, TablerColor color) #VisNetworkHtmlNodeCreates a progress bar node.
Parameters
- label System.String
- The label for the progress
- percentage System.Int32
- The percentage complete (0-100)
- color System.String
- The color of the progress bar
Returns
The current instance for method chaining
public VisNetworkHtmlNode WithProgressBar(String label, Int32 percentage) #VisNetworkHtmlNodeCreates a progress bar node using the default success color.
Parameters
- label System.String
- percentage System.Int32
WithProgressBar(System.String label, System.Int32 percentage, HtmlForgeX.TablerColor color) #Creates a progress bar node using a typed Tabler color.
Parameters
- label System.String
- percentage System.Int32
- color HtmlForgeX.TablerColor
public VisNetworkHtmlNode WithStatus(String status, TablerColor iconColor, String description = null) #VisNetworkHtmlNodeCreates a status indicator node with icon and text.
Parameters
- status System.String
- The status text
- iconColor System.String
- The color of the status indicator
- description System.String = null
- Optional description text
Returns
The current instance for method chaining
WithStatus(System.String status, HtmlForgeX.TablerColor iconColor, System.String description) #Creates a status indicator node with a typed Tabler color.
Parameters
- status System.String
- iconColor HtmlForgeX.TablerColor
- description System.String
public VisNetworkHtmlNode WithTable(String[] headers, String[][] rows) #VisNetworkHtmlNodeCreates a table-style node.
Parameters
- headers System.String[]
- The table headers
- rows System.String[][]
- The table rows (2D array)
Returns
The current instance for method chaining