HtmlForgeX

API Reference

Class

TablerCodeBlock

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element
Modifiers sealed

Reusable code or configuration artifact preview for JSON, XML, YAML, scripts, and plain text.

Inheritance

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

Accepted by parameters

Constructors

Methods

public TablerCodeBlock Code(String value, PrismJsLanguage language = None) #
Returns: TablerCodeBlock

Sets the rendered text and optional syntax language.

Parameters

value System.String requiredposition: 0
language HtmlForgeX.PrismJsLanguage = None optionalposition: 1
Json 2 overloads
public TablerCodeBlock Json(String value) #
Returns: TablerCodeBlock

Renders JSON text.

Parameters

value System.String requiredposition: 0
public TablerCodeBlock Json(Object value, JsonSerializerOptions options = null) #
Returns: TablerCodeBlock

Renders an object as indented JSON text.

Parameters

value System.Object requiredposition: 0
options System.Text.Json.JsonSerializerOptions = null optionalposition: 1
public TablerCodeBlock Language(PrismJsLanguage language) #
Returns: TablerCodeBlock

Sets the syntax language without replacing the current text.

Parameters

language HtmlForgeX.PrismJsLanguage requiredposition: 0
public TablerCodeBlock PowerShell(String value) #
Returns: TablerCodeBlock

Renders PowerShell text.

Parameters

value System.String requiredposition: 0
RegisterLibraries() #
public TablerCodeBlock Settings(Action<TablerCodeBlockSettings> configure) #
Returns: TablerCodeBlock

Groups less-common display options under one fluent entry point.

Parameters

configure System.Action{HtmlForgeX.TablerCodeBlockSettings} requiredposition: 0
public TablerCodeBlock Sql(String value) #
Returns: TablerCodeBlock

Renders SQL text.

Parameters

value System.String requiredposition: 0
public TablerCodeBlock Subtitle(String subtitle) #
Returns: TablerCodeBlock

Sets supporting text shown below the heading.

Parameters

subtitle System.String requiredposition: 0
public TablerCodeBlock Title(String title, String subtitle = null) #
Returns: TablerCodeBlock

Sets the block heading.

Parameters

title System.String requiredposition: 0
subtitle System.String = null optionalposition: 1
public override String ToString() #
Returns: String
public TablerCodeBlock Xml(String value) #
Returns: TablerCodeBlock

Renders XML text.

Parameters

value System.String requiredposition: 0
public TablerCodeBlock Yaml(String value) #
Returns: TablerCodeBlock

Renders YAML text.

Parameters

value System.String requiredposition: 0