html

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 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) GetCustomVariables added in v1.26.0

func (t *HTMLBlockType) GetCustomVariables() []cmsstore.BlockCustomVariable

GetCustomVariables returns nil as HTML blocks do not set any custom variables.

func (*HTMLBlockType) Render

Render renders an HTML block by returning its content as-is. Supports optional 'wrap' attribute to wrap content in an HTML element.

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