Skip to content

Reference

phil/ujo

Every type of the library, with its role.

TypeKindRole
Phil\Ujo\Ujofinal readonly classThe library in one object: decode(), normalize(), encode(), toHtml(), toText()
Phil\Ujo\Documentfinal readonly classA document: time, blocks, version; fromArray(), toArray(), walk(), find()
Phil\Ujo\Blockfinal readonly classA block: identifier, type, data, tunes; fromArray(), toArray(), children(), with*()
Phil\Ujo\Normalizerfinal readonly classChecks a document into canonical form, at a validation level
Phil\Ujo\ValidationenumShape, the default, or Publication: how much of a document is checked
Phil\Ujo\Json\JsonDecoderfinal readonly classStrict reading of UJO JSON
Phil\Ujo\Json\JsonEncoderfinal readonly classWriting UJO JSON in canonical form
Phil\Ujo\Schema\FieldinterfaceA value of a block's data, checked and canonical
Phil\Ujo\Schema\Shapefinal readonly classAn object of properties, closed or open
Phil\Ujo\Schema\Propertyfinal readonly classA property: required, optional or with a default; nullable; filled in for publication
Phil\Ujo\Contract\SizedinterfaceA field whose values have a size: characters, items, blocks, entries
Phil\Ujo\Schema\Boundedfinal readonly classA sized field within bounds for publication
Phil\Ujo\Schema\Html, Plain, Integer, Boolean, Choice, Link, ListOf, Blocks, Lazy, Dictionary, TextOrShapefinal readonly classThe fields
Phil\Ujo\Schema\Contextfinal classThe state of one normalization: identifiers met, depth, validation level
Phil\Ujo\Type\BlockTypefinal readonly classA type: name, aliases, shape, fold, upgrade, check, publication
Phil\Ujo\Type\BlockTypeRegistryfinal readonly classTypes by name or alias; default(), with(), without()
Phil\Ujo\Type\StandardTypesfinal classThe official Editor.js tools
Phil\Ujo\Type\CommunityTypesfinal classThe community tools
Phil\Ujo\Type\MediaTypesfinal classThe video and sound players
Phil\Ujo\Type\LayoutTypesfinal classThe page and game types
Phil\Ujo\Type\TableGridfinal classThe columns the cells of a table take, spans counted
Phil\Ujo\Type\StoredMarkupfinal classThe rendered property of the drawn types, and its limits
Phil\Ujo\Type\EmbedServicesfinal readonly classThe services an embed may frame, and their hosts
Phil\Ujo\Type\TuneTypefinal readonly classA tune: name, aliases, value
Phil\Ujo\Type\TuneRegistryfinal readonly classTunes by name or alias
Phil\Ujo\Type\Tunesfinal classThe default tunes
Phil\Ujo\Html\InlineSanitizerfinal readonly classInline HTML kept as a profile allows; text of a fragment; escaping
Phil\Ujo\Html\InlineProfilefinal readonly classAn ordered list of inline tools: rich(), plain(), mathMl(), raw()
Phil\Ujo\Html\InlineToolfinal readonly classAn element kept: patterns read, tag and class written, attributes
Phil\Ujo\Html\AttributeValueenumWhat an attribute may hold, and its cleaning
Phil\Ujo\Html\SafeUrlfinal classWhether an address may be written, and its scheme
Phil\Ujo\Html\LanguageTagfinal classWhether a language tag is well-formed in BCP 47
Phil\Ujo\Html\HtmlRendererfinal readonly classRenders a document with a renderer per type
Phil\Ujo\Html\BlockRendererinterfaceRenders blocks of some types
Phil\Ujo\Html\HtmlFilterinterfaceA last pass over the rendered HTML, which keeps it safe
Phil\Ujo\Html\Renderingfinal readonly classOne rendering: document, nested blocks, sanitizer, elements with tunes
Phil\Ujo\Html\Renderer\TextRenderer, ListRenderer, MediaRenderer, LayoutRendererfinal readonly classThe default renderers
Phil\Ujo\Html\Renderer\CodeRendererfinal readonly classThe renderer of code blocks, with an optional highlighter whose HTML it checks
Phil\Ujo\Html\Renderer\StoredMarkupRendererfinal readonly classWrites a block's trusted stored drawing, or falls back to another renderer
Phil\Ujo\Text\PlainTextfinal readonly classA document as plain text, a conversion per type
Phil\Ujo\Exception\UjoExceptioninterface, extends ThrowableEvery exception of the library
Phil\Ujo\Exception\InvalidJsonfinal class, InvalidArgumentExceptionA text that is not UJO JSON
Phil\Ujo\Exception\InvalidDocumentfinal class, InvalidArgumentExceptionA structure or data that breaks the model, with its path
Phil\Ujo\Exception\UnknownBlockTypefinal class, InvalidArgumentExceptionA type, tune or renderer not registered
Phil\Ujo\Exception\InvalidConfigurationfinal class, LogicExceptionAn inline profile not registered

See documents.md, block-types.md, normalization.md, inline-html.md, html-rendering.md, plain-text.md and exceptions.md.