This page explains how to operate the rich editor and its features.
The rich editor is an editor that allows you to input formatted text.
You can create content with a high degree of freedom, including headings, bold text, links, and image insertion. The created content can be retrieved as HTML via the API.

The rich editor is also known as a WYSIWYG editor and is commonly used in other CMSs and tools. The basic operation feels similar, so those who are familiar with it can quickly master it.
h1 to h5 and p tags are supported.
h1 to h5 will have a hashed string assigned as the id. (This means that the id remains fixed as long as the text is not changed.)
<h1 id="h634aaf8fde">Heading 1</h1>
Using the assigned id, it is possible to generate a table of contents on the frontend.
For more details, please refer to the article below.
Pressing Enter in the editor creates a new paragraph.
Pressing Shift + Enter inserts a line break.
// Paragraph
<p>Pressing Enter creates</p>
<p>a new paragraph.</p>
// Line Break
<p>Pressing Shift + Enter inserts<br>a line break.</p>
The difference between line breaks and paragraphs is visually indicated by spacing in the editor screen.

Text is enclosed in the strong tag.
<strong>Text that becomes bold</strong>Text is enclosed in the em tag.
<em>Text that becomes italic</em>Text is enclosed in the u tag.
<u>Text that is underlined</u>Text is enclosed in the s tag.
<s>Text with strikethrough</s>Text is enclosed in the code tag.
<code>console.log("Hello microCMS!")</code>You can specify any text color.

Text is enclosed in the span tag, and the style attribute is set with the color property (text color).
<span style=\"color: #ff0000\">Text Color</span>You can also select colors defined in the API settings in advance.

Enabling "Show only color presets and hide color picker" in the API settings allows you to select only the preset colors registered in advance.

To reset the text color, select [Remove Text Color].

You can specify any text size.

Text is enclosed in the span tag, and the style attribute is set with the font-size property (text size).
<span style=\"font-size: 120%\">Large Text</span>
To specify text size, you need to register presets in advance in the API settings.

To reset the text size, select [Remove Text Size Setting].

You can specify left align / center align / right align.
Left Align (Default)
<p>Left aligned text</p>Center Align
<p style="text-align: center">Center aligned text</p>Right Align
<p style="text-align: right">Right aligned text</p>The hr tag is inserted.
<hr>Text is enclosed in the blockquote tag.
<blockquote><p>Quoted text</p></blockquote>You can write source code over multiple lines.

Text is enclosed in the pre and code tags.
<pre>
<code>const greeting = "Hello microCMS!";\nconsole.log(greeting);</code>
</pre>You can specify a filename and language for the code block.
If specified, the response changes as follows.
<div data-filename="greeting.js">
<pre>
<code class="language-javascript">const greeting = "Hello microCMS!";\nconsole.log(greeting);</code>
</pre>
</div>You can input a table.

You can add rows and columns, merge and split cells, and set the first row and column as headers.

Data is represented using the table tag.
<table>
<tbody>
<tr>
<th colspan="1" rowspan="1">
<p>Company</p>
</th>
<th colspan="1" rowspan="1">
<p>Location</p>
</th>
</tr>
<tr>
<td colspan="1" rowspan="1">
<p>microCMS</p>
</td>
<td colspan="1" rowspan="1">
<p>Tokyo</p>
</td>
</tr>
</tbody>
</table>Text is enclosed in ul and li tags.
<ul>
<li>Apple</li>
<li>Orange</li>
</ul>Lists can be nested. If nested, the response will look like this.
<ul>
<li>Japan
<ul>
<li>Tokyo</li>
<li>Osaka</li>
<li>Saitama</li>
</ul>
</li>
<li>America</li>
</ul>The text will be enclosed in ol and li tags.
<ol>
<li>Account Registration</li>
<li>Service Registration</li>
<li>Create API</li>
</ol>You can specify links.

Text is wrapped in the a tag.
<p><a href="https://microcms.io">microCMS Service Site</a></p>Enabling "Open in a new tab" allows you to specify that the link opens in a new tab.
<p><a href="https://microcms.io" target="_blank" rel="noopener noreferrer">microCMS Service Site</a></p>Enabling "Do not allow search engines to evaluate" allows you to add the nofollow attribute. Below is an example where both "Open in a new tab" and "Do not allow search engines to evaluate" are enabled.
<p><a href="https://microcms.io" target="_blank" rel="noopener noreferrer nofollow">microCMS Service Site</a></p>The currently supported link formats are as follows:
https://example.com)/about, *1)mailto:example@example.com)tel:+1234567890, tel:81-90-1234-5678)#about)(*1) Some formats are not supported for relative URLs.
../)./)about)You can specify images.
<figure>
<img src="https://images.microcms-assets.io/assets/service/test/file.png"
alt="" width="1200" height="630" />
</figure>By clicking on the image entered in the rich editor, you can specify the image's width / height / alt / caption, as well as links (absolute path, relative path).
For the alt (alternative text), if it has been set from the media management screen, it will be overwritten by the value set in the rich editor.

If a link is specified for the image
<figure>
<a href="https://example.com">
<img src="https://images.microcms-assets.io/assets/service/test/file.png" alt="" width="1200" height="630" />
</a>
</figure>If a caption is set for the image
<figure>
<img src="https://images.microcms-assets.io/assets/service/test/file.png" alt="" width="1200" height="630" />
<figcaption>caption</figcaption>
</figure>Note that the supported link formats are the same as those that can be specified for text elements. For details, please refer to the section on "Links".

The style attribute of the figure tag will have the text-align property added.
<figure style="text-align: left;">
<img src="https://images.microcms-assets.io/assets/service/test/file.png"
alt="" width="1200" height="630" />
</figure>You can specify files.
a tagdata-embed-type is fixed to filedata-mime-type varies depending on the file typetarget is fixed to _blank<a
href="https://files.microcms-assets.io/assets/service/test/file.pdf"
target="_blank"
data-embed-type="file"
data-mime-type="application/pdf"
>
file.pdf
</a>
By clicking the link in the rich editor, you can change the link text.


This feature allows you to apply any class to the text.
The applied class can be freely utilized, such as applying styles on the front-end implementation.
<p><span class="highlight">Highlighted text</span></p>
The types of custom classes can be selected from the content defined in the API settings in advance.


You can embed external services like X and YouTube.
It supports approximately 1,900 types of external services. You can also embed general website URLs that are not dependent on specific services.
For the services in question, please refer to the "Iframely Embeds API Domains".
▼Example of YouTube embedding
<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https://www.youtube.com/embed/omKyoU5Ia04?rel=0\" style=\"top: 0; left: 0; width: 100%; height: 100%; position: absolute; border: 0;\" allowfullscreen scrolling=\"no\" allow=\"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share;\"></iframe></div>You can reset styles and HTML tag information for the selected range.
You can go back one step or move forward.
Markdown syntax is also possible in the rich editor.
The following syntax is supported.
# Heading
**Bold**
*Italic*
~~Strikethrough~~
- List
1. Numbered List
> Quote
`Code`
```Code Block```The following shortcut keys are available in the rich editor.
*However, they may not work in some environments.
esc → Exit full screen
⌘ (Ctrl) + S → Save draft
⌘ (Ctrl) + Shift + S → Publish
⌘ (Ctrl) + Alt + 1-5 → Headings 1-5
⌘ (Ctrl) + B → Bold
⌘ (Ctrl) + I → Italic
⌘ (Ctrl) + U → Underline
⌘ (Ctrl) + Shift + X → Strikethrough
⌘ (Ctrl) + E → Code
⌘ (Ctrl) + Shift + E → Center align
⌘ (Ctrl) + Shift + R → Right align
⌘ (Ctrl) + Shift + B → Quote
⌘ (Ctrl) + Alt + C → Code block
⌘ (Ctrl) + Shift + 8 → List
⌘ (Ctrl) + Shift + 7 → Numbered list
⌘ (Ctrl) + Z → Undo
⌘ (Ctrl) + Shift + Z → RedoThe new rich editor uses Tiptap for its editor part. Please also refer to Tiptap's keyboard shortcuts.
You can customize the decoration buttons of the rich editor. By clicking on Advanced Settings from the rich editor in the API schema, a side menu will open, allowing you to customize from Edit Toolbar.
You can conveniently use it by narrowing down to only the decorations considered on the website.

richEditorFormat)We recommend using custom classes as an alternative to the discontinued decorations.
The old Rich Editor is treated as a separate field due to its different internal data structure.
Therefore, switching from the old Rich Editor requires manual migration work.
For more details, please refer to the help page below.
Contents