|
|
@@ -85,11 +85,11 @@ There could be situations when there is no obvious way to set the caret before o
|
|
|
|
|
|
* To type **before the code block**: Put the selection at the beginning of the first line of the code block and press <kbd>Enter</kbd>. Move the selection to the empty line that has been created and press <kbd>Enter</kbd> again. A new paragraph that you can type in will be created before the code block.
|
|
|
|
|
|
-{@img assets/img/typing-before.gif 770 The animation shows typing before the code blocks in CKEditor 5 rich text editor.}
|
|
|
+{@img assets/img/code-blocks-typing-before.gif 770 The animation shows typing before the code blocks in CKEditor 5 rich text editor.}
|
|
|
|
|
|
* To type **after the code block**: Put the selection at the end of the last line of the code block and press <kbd>Enter</kbd> twice. A new paragraph that you can type in will be created after the code block.
|
|
|
|
|
|
-{@img assets/img/typing-after.gif 770 The animation shows typing after the code blocks in CKEditor 5 rich text editor.}
|
|
|
+{@img assets/img/code-blocks-typing-after.gif 770 The animation shows typing after the code blocks in CKEditor 5 rich text editor.}
|
|
|
|
|
|
### Changing line indentation
|
|
|
|
|
|
@@ -98,7 +98,7 @@ You can change the indentation of the code using keyboard shortcuts and toolbar
|
|
|
* To **increase** indentation: Select the line (or lines) you want to indent. Hit the <kbd>Tab</kbd> key or press the "Increase indent" button in the toolbar.
|
|
|
* To **decrease** indentation: Select the line (or lines) the indent should decrease. Hit the <kbd>Shift</kbd>+<kbd>Tab</kbd> keys or press the "Decrease indent" button in the toolbar.
|
|
|
|
|
|
-{@img assets/img/outdent-indent.gif 770 The animation shows changing indention inside code blocks in CKEditor 5 rich text editor.}
|
|
|
+{@img assets/img/code-blocks-outdent-indent.gif 770 The animation shows changing indention inside code blocks in CKEditor 5 rich text editor.}
|
|
|
|
|
|
<info-box>
|
|
|
The indentation created this way can be changed. Use the {@link module:code-block/codeblock~CodeBlockConfig#indentSequence `codeBlock.indentSequence`} configuration to choose some other character (or characters) of your preference (e.g. four spaces). By default, the indentation changes by a single tab (`\t`) character.
|
|
|
@@ -112,7 +112,7 @@ You can change the indentation of the code using keyboard shortcuts and toolbar
|
|
|
|
|
|
To speed up the editing, when typing in a code block, the indentation of the current line is preserved when you hit <kbd>Enter</kbd> and create a new line. If you want to change the indentation of the new line, take a look at [some easy ways to do that](#changing-line-indentation).
|
|
|
|
|
|
-{@img assets/img/preserve-indention.gif 770 The animation shows preserving indention inside code blocks in CKEditor 5 rich text editor.}
|
|
|
+{@img assets/img/code-blocks-preserve-indention.gif 770 The animation shows preserving indention inside code blocks in CKEditor 5 rich text editor.}
|
|
|
|
|
|
## Installation
|
|
|
|