Richtext is used to achieve inline
<a> combined with inline-block
<image> . It also supports nested
<a> with style inheritance and override. Thus, richtext can be considered as a more general
<text> with more powerful usage.
<image> are valid children of
<a> are considered as
<image> is considered as
display:inline-block, which are default values and cannot be changed.
<richtext> can be classified as two types of node, internal and external.
<a>are internal nodes, while
<image>is external node.
Richtext can be seen as a tree, and the max height of the tree is 255. Any style on a node of which the height is greater than 255 has no effect.
<a>on iOS will have a
color:bluestyle, and children of
<a>can not override this style. This only happens on iOS. There is no default style and override restriction for
<image>in richtext must have
<image>will remain blank until the corresponding image is downloaded and there is no way to display a placeholder image.
Supported attributes of children of a
<span> does not support any attribute. A text must be set as the content of
Only limited css styles listed below are supported by richtext.
atag when the
imgtag is clicked.
atag has a
pseudo-refproperty whose value will be sent with the itemclick event. **Please be noted that the default jump behavior on
atag will be disabled at this moment.`Demo
itemclickis specified on nested nodes, only the event on the outer node will take effect.