Skip to content

Extension points

phil/ujo

The library is at 0.x: its extension points are stable only from its 1.0 release. Until then, a minor version may change them, and its CHANGELOG says how.

ToDo
Accept a type of your ownAdd a BlockType to a BlockTypeRegistry and give it to Normalizer; see Normalization
Ask more of a type before publicationProperty::filled(), a Bounded field, or the publication hook of BlockType; see Normalization
Bound a field of your ownImplement Contract\Sized and wrap the field in Bounded
Accept a tune of your ownAdd a TuneType to a TuneRegistry
Render a type differently, or render a new oneImplement Html\BlockRenderer and pass it to HtmlRenderer::with(); see HTML rendering
Colour code blocks on the serverHtmlRenderer::withCodeHighlighter()
Draw blocks from the markup they keepHtmlRenderer::withStoredMarkup(), with a closure that checks the key
Pass over the rendered HTMLImplement Html\HtmlFilter and pass it to HtmlRenderer::withFilter()
Convert a type to text differentlyReplace its conversion in PlainText; see Plain text
Sanitize inline HTML with other rulesBuild an InlineSanitizer with profiles of your own, by name, and give it to HtmlRenderer::default()