目录

How do I implement a mixed text and image layout?

  1. Lightweight mixed text and image layout: Nest Span and ImageSpan child components in the Text component. For details, see Example 1: Setting the Alignment Mode in ImageSpan.
  2. Rich mixed text and image layout with interactive text editing: Use the RichEditor component, add text content through addTextSpan(), and add image content through addImageSpan(). For details, see Example 1: Updating the Text Style in RichEditor.