rich-text
rich text component.
Example
bxml
js
#
PropsProperty | Type | Default Value | Required | Description |
---|---|---|---|---|
nodes | array/string | [] | true | Node list/HTML String |
space | string | text | false | Display continuous spaces |
nodes
#
Valid values of Now supports two types of nodes, distinguished by type, namely element nodes and text nodes, the default is element nodes, HTML nodes displayed in the rich text area.
#
type = nodeValue | Type | Description |
---|---|---|
name | string | tag name |
attrs | Object | attributes |
children | array | children of this element. |
#
type = textValue | Type | Description |
---|---|---|
text | string | text |
Bug & Tip
tip
: nodes Not recommended. String Type, performance will drop.tip
: Masking all node events within a component.tip
: attrs Property is not supported id Support class.tip
: name Property is not case sensitive.tip
: If an untrusted HTML node is used, the node and all its children are removed.tip
: img Tags only support web picturestip
: If you use the rich-text Component, then only the custom component s wxss Style pair rich-text to hit the target class Entry into force.