MCPcopy Create free account
hub / github.com/cogentcore/core / ReadHTMLString

Function ReadHTMLString

htmlcore/html.go:30–33  ·  view source on GitHub ↗

ReadHTMLString reads HTML from the given string and adds corresponding Cogent Core widgets to the given [core.Widget], using the given context.

(ctx *Context, parent core.Widget, s string)

Source from the content-addressed store, hash-verified

28// ReadHTMLString reads HTML from the given string and adds corresponding
29// Cogent Core widgets to the given [core.Widget], using the given context.
30func ReadHTMLString(ctx *Context, parent core.Widget, s string) error {
31 b := bytes.NewBufferString(s)
32 return ReadHTML(ctx, parent, b)
33}
34
35// readHTMLNode reads HTML from the given [*html.Node] and adds corresponding
36// Cogent Core widgets to the given [core.Widget], using the given context.

Callers 4

mainFunction · 0.92
TestInlineContainerFunction · 0.85
TestNoInlineContainerFunction · 0.85
TestHTMLFunction · 0.85

Calls 1

ReadHTMLFunction · 0.85

Tested by 3

TestInlineContainerFunction · 0.68
TestNoInlineContainerFunction · 0.68
TestHTMLFunction · 0.68