rich_text_component

Function rich_text_component 

Source
pub fn rich_text_component(child: impl IntoUiNode, kind: &'static str) -> UiNode
Expand description

An UI node that implements some behavior for rich text composition.

This node is intrinsic to the Text! widget and is part of the rich_text property. Note that the actual rich text editing is implemented by the resolve_text and layout_text nodes that are intrinsic to Text!.

The kind identifies what kind of component, the value "rich_text" is used by the rich_text property, the value "text" is used by the Text! widget, any other value defines a RichTextComponent::Leaf that is expected to be focusable, inlined and able to handle rich text composition requests.