Skip to content

Commit

Permalink
Merge pull request #1866 from strapi/user/rich-text-editor
Browse files Browse the repository at this point in the history
New Blocks Rich Text editor documentation
  • Loading branch information
meganelacheny authored Oct 11, 2023
2 parents f2deb08 + 26517f2 commit 5654ef4
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docusaurus/docs/user-docs/content-manager/writing-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ To write or edit content:
| Field name | Instructions |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Text | Write your content in the textbox. |
| Rich text | Write your content in the textbox. Formatting options are available in the top bar of the textbox, as well as a **Preview mode/Markdown mode** button to switch between modes. <br /><br /> 💡 The box can be expanded by clicking on **Expand** in the bottom bar. It displays side by side, at the same time, the textbox that you can edit and the preview. |
| Rich text (Markdown) | Write your textual content in the editor, in Markdown. Some basic formatting options (titles, bold, italics, underline) are available in the top bar of the editor to apply to selected text. A **Preview mode/Markdown mode** button to switch between modes is also available. <br /><br /> 💡 The box can be expanded by clicking on **Expand** in the bottom bar. It displays side by side, at the same time, the textbox that you can edit and the preview. |
| Rich text (Blocks) <BetaBadge /> | Write and manage your content in the editor, which automatically renders live all additions/updates. Options are accessible from the top bar of the editor (basic formatting options, code, links, image etc.). <!-- <br /><br /> 💡 Type `/` in the editor to have access to the list of all available options and select one. --> |
| Number | Write your number in the textbox. Up and down arrows, displayed on the right of the box, allow to increase or decrease the current number indicated in the textbox. |
| Date | 1. Click the date and/or time box. <br /> 2. Type the date and time or choose a date using the calendar and/or a time from the list. The calendar view fully supports keyboard-based navigation.
| Boolean | Click on **OFF** or **ON**. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Depending on what content-type or component is being created or edited, not all

<ThemedImage
alt="Fields selection"
width="80%"
sources={{
light: '/img/assets/content-type-builder/fields-selection.png',
dark: '/img/assets/content-type-builder/fields-selection_DARK.png',
Expand Down Expand Up @@ -59,17 +58,17 @@ The Text field displays a textbox that can contain small text. This field can be

</Tabs>

### <img width="28" src="/img/assets/icons/ctb_richtext.svg" /> Rich Text
### <img width="28" src="/img/assets/icons/ctb_richtext.svg" /> Rich Text (Markdown)

The Rich Text field displays an editor with formatting options to manage rich text. This field can be used for long written content.
The Rich Text (Markdown) field displays an editor with basic formatting options to manage rich text written in Markdown. This field can be used for long written content.

<Tabs>

<TabItem value="base" label="Base settings">

| Setting name | Instructions |
|--------------|----------------------------------------|
| Name | Write the name of the Rich Text field. |
| Setting name | Instructions |
|--------------|---------------------------------------------------|
| Name | Write the name of the Rich Text (Markdown) field. |

</TabItem>

Expand All @@ -81,14 +80,38 @@ The Rich Text field displays an editor with formatting options to manage rich te
| Private field | Tick to make the field private and prevent it from being found via the API. |
| Enable localization for this field | (if the [Internationalization plugin](/user-docs/plugins/strapi-plugins#-internationalization-plugin) is installed and localization is enabled for the content-type) Allow the field to have a different value per locale. |
| Required field | Tick to prevent creating or saving an entry if the field is not filled in. |
| Unique field | Tick to prevent another field to be identical to this one. |
| Maximum length | Tick to define a maximum number of characters allowed. |
| Minimum length | Tick to define a minimum number of characters allowed. |

</TabItem>

</Tabs>

### <img width="28" src="/img/assets/icons/ctb_richtextblocks.svg" /> Rich Text (Blocks) <BetaBadge />

The Rich Text (Blocks) field displays an editor with live rendering and various options to manage rich text. This field can be used for long written content, even including images and code.

<Tabs>

<TabItem value="base" label="Base settings">

| Setting name | Instructions |
|--------------|-------------------------------------------------|
| Name | Write the name of the Rich Text (Blocks) field. |

</TabItem>

<TabItem value="advanced" label="Advanced settings">

| Setting name | Instructions |
|----------------|-----------------------------------------------------------------------------|
| Private field | Tick to make the field private and prevent it from being found via the API. |
| Required field | Tick to prevent creating or saving an entry if the field is not filled in. |

</TabItem>

</Tabs>

### <img width="28" src="/img/assets/icons/ctb_number.svg" /> Number

The Number field displays a field for any kind of number: integer, decimal and float.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions docusaurus/static/img/assets/icons/ctb_richtextblocks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5654ef4

Please sign in to comment.