-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
indentediting.ts
37 lines (32 loc) · 948 Bytes
/
indentediting.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @module indent/indentediting
*/
import { Plugin, MultiCommand } from 'ckeditor5/src/core.js';
/**
* The indent editing feature.
*
* This plugin registers the `'indent'` and `'outdent'` commands.
*
* **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in the
* {@link module:indent/indent~Indent indent feature} API documentation.
*/
export default class IndentEditing extends Plugin {
/**
* @inheritDoc
*/
public static get pluginName() {
return 'IndentEditing' as const;
}
/**
* @inheritDoc
*/
public init(): void {
const editor = this.editor;
editor.commands.add( 'indent', new MultiCommand( editor ) );
editor.commands.add( 'outdent', new MultiCommand( editor ) );
}
}