We use a subset of HTML to represent rich texts.
<hr />
but use <hr></hr>
Paragraph: <p>
Block quote: <blockquote>
Bullet list: <ul>
Code block: <pre>
Note: Must contain a single <code>
child
Figure: <figure>
Heading: <h1>
, <h2>
, <h3>
Horizontal rule: <hr>
List item: <li>
Note: Parent must be <ol>
or <ul>
Ordered list: <ol>
Bold: <strong>
Code: <code>
Image: <img>
Note: Parent must be <figure>
Attributes:
src
: stringwidth
: number (optional)height
: number (optional)title
: string (optional)Italic: <em>
Line break: <br>
Link: <a>
Attributes:
href
: string