Overview of the Taro Editor component
The Editor component is a rich text editor that allows users to edit text and images. It supports exporting content as tagged HTML or plain text, while internally storing data in the Delta format.
Key constraints and behaviors:
- HTML Support: Supports partial HTML tags and inline styles; however,
classandidattributes are not supported. - Content Insertion: When using the
setContentsinterface, inserting HTML may cause parsing errors due to illegal tags. It is recommended to use the Delta format for insertions within mini-programs. - Styling: The component includes basic internal styles. If you use the exported HTML in other components or environments, you must manually include the editor's styles and maintain the
<ql-container><ql-editor></ql-editor></ql-container>DOM structure. - Image Controls: Image control settings are only effective during initialization.