#[PlainText]

Attribute on parameters and properties.

use Saij\WpAppFramework\Value\PlainText;

An inline text field without markup. Allowed on strings; the attribute gets role: content. Templates print it with Twig's autoescaping, a multiline field with |nl2br.

Arguments

#[PlainText(bool $inspector = false, bool $excerpt = false, bool $multiline = false)]
ParameterTypeDefaultDescription
inspectorboolfalseEdit the field in the block inspector instead of the canvas; the template then prints it without field(), and changing it re-renders the block.
excerptboolfalseInclude the value in automatic excerpts; the block is then added to excerpt_allowed_blocks. Not allowed in blocks with inner blocks.
multilineboolfalseAllow line breaks: Enter inserts a line break in the canvas, the inspector and forms show a text area. The value contains "\n"; print it with `