-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
typing.js
63 lines (56 loc) · 1.62 KB
/
typing.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @module typing/typing
*/
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import Input from './input';
import Delete from './delete';
/**
* The typing feature. It handles typing.
*
* This is a "glue" plugin which loads the {@link module:typing/input~Input} and {@link module:typing/delete~Delete}
* plugins.
*
* @extends module:core/plugin~Plugin
*/
export default class Typing extends Plugin {
static get requires() {
return [ Input, Delete ];
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'Typing';
}
}
/**
* The configuration of the typing features. Used by the features from the `@ckeditor/ckeditor5-typing` package.
*
* Read more in {@link module:typing/typing~TypingConfig}.
*
* @member {module:typing/typing~TypingConfig} module:core/editor/editorconfig~EditorConfig#typing
*/
/**
* The configuration of the typing features. Used by the typing features in `@ckeditor/ckeditor5-typing` package.
*
* ClassicEditor
* .create( editorElement, {
* typing: ... // Typing feature options.
* } )
* .then( ... )
* .catch( ... );
*
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
*
* @interface TypingConfig
*/
/**
* The granularity of undo/redo for typing and deleting. The value `20` means (more or less) that a new undo step
* is created every 20 characters are inserted or deleted.
*
* @member {Number} [module:typing/typing~TypingConfig#undoStep=20]
*/