html

package
v1.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTMLBlockType

type HTMLBlockType struct{}

HTMLBlockType provides both frontend rendering and admin UI for HTML blocks.

This is a built-in block type that renders raw HTML content. It includes a CodeMirror editor in the admin UI for syntax highlighting.

func NewHTMLBlockType

func NewHTMLBlockType() *HTMLBlockType

NewHTMLBlockType creates a new HTML block type.

func (*HTMLBlockType) GetAdminFields

func (t *HTMLBlockType) GetAdminFields(block cmsstore.BlockInterface, r *http.Request) interface{}

GetAdminFields returns form fields for editing HTML block content.

func (*HTMLBlockType) Render

func (t *HTMLBlockType) Render(ctx context.Context, block cmsstore.BlockInterface) (string, error)

Render renders an HTML block by returning its content as-is.

func (*HTMLBlockType) SaveAdminFields

func (t *HTMLBlockType) SaveAdminFields(r *http.Request, block cmsstore.BlockInterface) error

SaveAdminFields processes form submission and updates the HTML block.

func (*HTMLBlockType) TypeKey

func (t *HTMLBlockType) TypeKey() string

TypeKey returns the unique identifier for HTML blocks.

func (*HTMLBlockType) TypeLabel

func (t *HTMLBlockType) TypeLabel() string

TypeLabel returns the display name for HTML blocks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL