From dfb8300a4224022dd26522dc423c3256b88c922f Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Mon, 18 Sep 2023 12:37:08 +0200 Subject: [PATCH] Improve intro to the `Plugin configuration` tutorial (#15019) Docs: Improve intro to the `Plugin configuration` tutorial. Closes #15006. --- docs/tutorials/crash-course/plugin-configuration.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/tutorials/crash-course/plugin-configuration.md b/docs/tutorials/crash-course/plugin-configuration.md index 584436705aa..494048441fa 100644 --- a/docs/tutorials/crash-course/plugin-configuration.md +++ b/docs/tutorials/crash-course/plugin-configuration.md @@ -10,19 +10,15 @@ modified_at: 2023-08-16 ## Configuration convention -As we learned at the beginning of this tutorial, the editor accepts a configuration object that allows you to change its default behavior and appearance. +As we learned at the beginning of this tutorial, the editor accepts a configuration object that allows you to change its default behavior and appearance. The convention used in CKEditor 5 is to have a unique object key for each plugin to avoid conflicts and to make it obvious what each part of the configuration does. -For the purpose of this tutorial, we will add a single option to configure the keyboard shortcut for highlighting the selected text. - -The convention used in CKEditor is to have a unique object key for each plugin, to avoid conflicts and make it obvious what each part of the configuration does. - -Following this convention, we will add an optional `highlight` key to the configuration, which can contain a `keystroke` option: +In this tutorial, we will add a single option to the `highlight` plugin to configure its keyboard shortcut. This configuration will be included in an optional `highlight` key: ```js const editor = await ClassicEditor.create( element, { // Other options are omitted for readability - do not remove them. highlight: { - keystroke: '...' + } } ); ``` @@ -39,7 +35,7 @@ editor.config.define( 'highlight', { } ); ``` -The first parameter passed to the method is the name of the configuration object key, and the second is the defaults. +The first parameter passed to the method is the name of the configuration object key, and the second is the default values. ### Loading configuration option