Documentation
¶
Index ¶
- func Convert(value Markdown) htmlui.Surface
- func DespawnMarkdown(world *ecs.World, entity ecs.Entity) bool
- func MarkdownSystem(name string) ecs.SystemConfig
- func SetMarkdownVisible(world *ecs.World, entity ecs.Entity, visible bool)
- func SpawnMarkdown(world *ecs.World, opts MarkdownOptions) ecs.Entity
- func SyncSystem(name string) ecs.SystemConfig
- type Feature
- type Markdown
- type MarkdownLayout
- type MarkdownOptions
- type MarkdownStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert builds Markdown's DOM and stylesheet for an owned HTML surface. Call it when the source/style changes; retained HTML handles stable frames.
func MarkdownSystem ¶
func MarkdownSystem(name string) ecs.SystemConfig
MarkdownSystem runs the Markdown-to-HTML conversion stage without invoking the complete UI synchronization pipeline. Feature integrations use it when registering the optional runtime extension.
func SetMarkdownVisible ¶
func SpawnMarkdown ¶
func SpawnMarkdown(world *ecs.World, opts MarkdownOptions) ecs.Entity
func SyncSystem ¶
func SyncSystem(name string) ecs.SystemConfig
Types ¶
type Feature ¶
type Feature struct{}
Feature installs Markdown conversion on top of the HTML UI runtime. Keeping it in this package makes Markdown's parser and syntax highlighter a link-time optional dependency.
type Markdown ¶
type Markdown struct {
Value string
Style MarkdownStyle
Width float32
PassThrough bool
}
Markdown stores authored Markdown. Its rendered HTML lives in the html.Surface component on the same entity.
type MarkdownLayout ¶
func UpdateMarkdown ¶
func UpdateMarkdown(world *ecs.World, entity ecs.Entity, opts MarkdownOptions) MarkdownLayout
type MarkdownOptions ¶
type MarkdownStyle ¶
type MarkdownStyle struct {
Font *onixtext.Font
BoldFont *onixtext.Font
FontSize float64
DPI float64
StackIndex int
QuoteWidth float32
Text graphics.ColorRGBA
Quote graphics.ColorRGBA
QuoteBackground graphics.ColorRGBA
Italic graphics.ColorRGBA
Strike graphics.ColorRGBA
Bold graphics.ColorRGBA
Heading graphics.ColorRGBA
TableHeader graphics.ColorRGBA
Link graphics.ColorRGBA
Code graphics.ColorRGBA
Math graphics.ColorRGBA
CodeBackground graphics.ColorRGBA
MathBackground graphics.ColorRGBA
TableHeaderBackground graphics.ColorRGBA
TableOddBackground graphics.ColorRGBA
TableEvenBackground graphics.ColorRGBA
Radius ui.CornerRadius
TableFontSize float64
InlineMathFontSize float64
DisplayMathFontSize float64
}
MarkdownStyle controls the stylesheet applied to converted Markdown HTML.
func DefaultMarkdownStyle ¶
func DefaultMarkdownStyle(theme ui.Theme) MarkdownStyle