# text

Start from base library version 1.0.0. Please remaining backward compatible.

Text.

attribute type Default value Required Introductions Minimum version
selectable boolean false no Text optional (Derelict) 1.1.0
user-select boolean false no Whether the text is optional, this property causes the text node to display as inline-block 2.12.1
space string no Display continuous spaces 1.4.0
decode boolean false no Whether to decode 1.4.0

space Legal value

value Introductions Minimum version
ensp Chinese character space half size
emsp Chinese character space size
nbsp Space size based on font

# Bug & Tip

  1. tip: Decode can be parsed with &nbsp &lt &gt &amp &apos &ensp &emsp
  2. tip: The standard of whitespace is not consistent across operating systems.
  3. tip:text Support within a component only text Nesting.
  4. tip: No node other than the text node can be long-pressed.
  5. bug: Base library version below 2.1.0 When, text Component embedded text style Settings may not take effect.

# sample code

Preview with Developer Tool