richtext package
Functions
Function | Description |
---|---|
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> |
Interfaces
Interface | Description |
---|---|
HeadingNode | |
LinkNode | |
ListItemNode | |
ListNode | |
NodeStringRendererProps | |
ParagraphNode | |
RichTextNode | |
StringRenderContext | |
TextNode |
Variables
Variable | Description |
---|---|
getLabelForElement | |
getLabelForFormat | |
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> |
resolveDefaultTextRenderer | 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. |
richTextBuiltInElements | |
richTextBuiltInFormats | |
rootHtmlRenderer | |
textHtmlRenderer | |
walkRichTextTree |
Type Aliases
Type Alias | Description |
---|---|
NodeStringRenderer | |
ParameterRichTextValue | |
ResolveStringRenderer | |
RichTextNodeWithChildren |