Skip to content

Commit

Permalink
Docs: adding feature information. [short flow]
Browse files Browse the repository at this point in the history
  • Loading branch information
godai78 committed Feb 19, 2025
1 parent 21df400 commit b6755a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Start by creating a template of the document in the standard editing mode. Selec

Then switch to the restricted editing mode to see how the editable and non-editable regions behave.

<info-box>
<info-box info>
Tip: Use <kbd>Tab</kbd> to navigate from one editable region to another (and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move back) in the restricted mode.
</info-box>

Expand All @@ -30,7 +30,7 @@ Then switch to the restricted editing mode to see how the editable and non-edita
The restricted editing feature enables two editing modes:

* **Standard editing mode** &ndash; In this mode the user can edit the content and choose regions that should be editable in the restricted editing mode.
* **Restricted editing mode** &ndash; When you initialize the editor in this mode, the user can edit the content only within the regions chosen by the user in the standard editing mode.
* **Restricted editing mode** &ndash; When you initialize the editor in this mode, the user can edit the content only within the regions chosen by the user in the standard editing mode. This mode supports only inline-type changes. Users can type, delete content, and format the text. However, no block-type editions are available. This means no splitting paragraphs (striking the <kbd>Enter</kbd> key) is allowed. Tables or block images cannot be added in this mode, too.

You can imagine a workflow where a certain group of users is responsible for creating templates of documents. At the same time, a second group of users can only fill the gaps (for example, fill in the missing data, like names, dates, product names, etc.).

Expand Down Expand Up @@ -106,6 +106,10 @@ ClassicEditor

**Note**: Typing and deleting text is always possible in restricted editing regions. For more information, check out the {@link module:restricted-editing/restrictededitingconfig~RestrictedEditingConfig `config.restrictedEditing`} documentation.

<info-box warning>
Only inline content inserting or editing commands are allowed in this setting. It means, block content commands such as `insertTable` or `enter` cannot be allowed via this setting, as they are not supported in the restricted editing mode.
</info-box>

### Enabling commands in the restricted editing mode

The restricted editing mode allows modifying the editor content only in designated regions. Outside these regions, most of the editor commands are turned off by default. If you wish to enable some commands outside the restricted editing regions, you can use the {@link module:restricted-editing/restrictededitingmodeediting~RestrictedEditingModeEditing#enableCommand `RestrictedEditingModeEditing.enableCommand()`} method. You must execute this method in the {@link module:core/plugin~PluginInterface#afterInit `afterInit()`} callback of an editor plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export interface RestrictedEditingConfig {
* };
* ```
*
* To make a command always enabled (also outside non-restricted areas) use
* Only inline content inserting or editing commands are allowed in this setting. It means, block content commands such as
* `insertTable` or `enter` cannot be allowed via this setting, as they are not supported in the restricted editing mode.
*
* To make a command always enabled (also outside non-restricted areas) use the
* {@link module:restricted-editing/restrictededitingmodeediting~RestrictedEditingModeEditing#enableCommand} method.
*/
allowedCommands: Array<string>;
Expand Down

0 comments on commit b6755a5

Please sign in to comment.