Home > @uniformdev/richtext

richtext package

Functions

FunctionDescription
getLabelForElement(type)
getLabelForFormat(type)
getRichTextTagsFromTextFormat(format)Convert format bitflag for holding text formats into relevant tags
hasChildren(node)
isArrayWithLength(arr)
isPureDirection(direction)
isPureTextAlign(format)
isRichTextNode(node)
isRichTextNodeType(node, type)
isRichTextNodeType(node, type)
isRichTextNodeType(node, type)
isRichTextNodeType(node, type)
isRichTextNodeType(node, type)
isRichTextNodeType(node, type)
isRichTextNodeType(node, type)
isRichTextValue(value)
isRichTextValueConsideredEmpty(value)
linkParamValueToHref(link)
purifyText(text)
renderChildrenToHtml(children, context)<p>Render an array of RichTextNodes to a string based on a particular context.</p><p>This will often be called from within a NodeRenderer using the <code>renderChildren</code> prop.</p>
renderChildrenToText(children, context)<p>Render an array of RichTextNodes to a string based on a particular context.</p><p>This will often be called from within a NodeRenderer using the <code>renderChildren</code> prop.</p>
renderHtmlElement(tag, attributes, children)
renderToHtml(node, parentContext)<p>Render a node and its children to HTML</p><p>This could be the root node or a nested node</p>
renderToText(node, parentContext)<p>Render a node and its children to text</p><p>This could be the root node or a nested node</p>
walkRichTextTree(node, callback, parent)

Interfaces

InterfaceDescription
HeadingNode
LinkNode
ListItemNode
ListNode
NodeStringRendererProps
ParagraphNode
RichTextNode
StringRenderContext
TextNode

Variables

VariableDescription
headingHtmlRenderer
linkHtmlRenderer
listHtmlRenderer
listitemHtmlRenderer
paragraphHtmlRenderer
resolveDefaultHtmlRenderer<p>When a custom renderer has not been provided we check to see if there is a renderer for the type within the map above. These are for any node types which include extra logic.</p><p>Some node types like quote just map directly to a HTML tag (ie blockquote). For those there is a simple type -> tag Map.</p>
resolveDefaultTextRendererWhen a custom renderer has not been provided we check to see if there is a renderer for the type within the map above. These are for any node types which include extra logic.
richTextBuiltInElements
richTextBuiltInFormats
rootHtmlRenderer
textHtmlRenderer

Type Aliases

Type AliasDescription
NodeStringRenderer
ParameterRichTextValue
ResolveStringRenderer
RichTextNodeWithChildren