@ckeditor/ckeditor5-word-count 41.3.0-alpha.4 → 41.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -3
- package/src/index.d.ts +1 -1
- package/dist/content-index.css +0 -4
- package/dist/editor-index.css +0 -4
- package/dist/index.css +0 -4
- package/dist/translations/ar.d.ts +0 -8
- package/dist/translations/ar.js +0 -5
- package/dist/translations/az.d.ts +0 -8
- package/dist/translations/az.js +0 -5
- package/dist/translations/bg.d.ts +0 -8
- package/dist/translations/bg.js +0 -5
- package/dist/translations/bn.d.ts +0 -8
- package/dist/translations/bn.js +0 -5
- package/dist/translations/ca.d.ts +0 -8
- package/dist/translations/ca.js +0 -5
- package/dist/translations/cs.d.ts +0 -8
- package/dist/translations/cs.js +0 -5
- package/dist/translations/da.d.ts +0 -8
- package/dist/translations/da.js +0 -5
- package/dist/translations/de-ch.d.ts +0 -8
- package/dist/translations/de-ch.js +0 -5
- package/dist/translations/de.d.ts +0 -8
- package/dist/translations/de.js +0 -5
- package/dist/translations/el.d.ts +0 -8
- package/dist/translations/el.js +0 -5
- package/dist/translations/en-au.d.ts +0 -8
- package/dist/translations/en-au.js +0 -5
- package/dist/translations/en-gb.d.ts +0 -8
- package/dist/translations/en-gb.js +0 -5
- package/dist/translations/en.d.ts +0 -8
- package/dist/translations/en.js +0 -5
- package/dist/translations/es-co.d.ts +0 -8
- package/dist/translations/es-co.js +0 -5
- package/dist/translations/es.d.ts +0 -8
- package/dist/translations/es.js +0 -5
- package/dist/translations/et.d.ts +0 -8
- package/dist/translations/et.js +0 -5
- package/dist/translations/fa.d.ts +0 -8
- package/dist/translations/fa.js +0 -5
- package/dist/translations/fi.d.ts +0 -8
- package/dist/translations/fi.js +0 -5
- package/dist/translations/fr.d.ts +0 -8
- package/dist/translations/fr.js +0 -5
- package/dist/translations/gl.d.ts +0 -8
- package/dist/translations/gl.js +0 -5
- package/dist/translations/he.d.ts +0 -8
- package/dist/translations/he.js +0 -5
- package/dist/translations/hi.d.ts +0 -8
- package/dist/translations/hi.js +0 -5
- package/dist/translations/hr.d.ts +0 -8
- package/dist/translations/hr.js +0 -5
- package/dist/translations/hu.d.ts +0 -8
- package/dist/translations/hu.js +0 -5
- package/dist/translations/hy.d.ts +0 -8
- package/dist/translations/hy.js +0 -5
- package/dist/translations/id.d.ts +0 -8
- package/dist/translations/id.js +0 -5
- package/dist/translations/it.d.ts +0 -8
- package/dist/translations/it.js +0 -5
- package/dist/translations/ja.d.ts +0 -8
- package/dist/translations/ja.js +0 -5
- package/dist/translations/ko.d.ts +0 -8
- package/dist/translations/ko.js +0 -5
- package/dist/translations/ku.d.ts +0 -8
- package/dist/translations/ku.js +0 -5
- package/dist/translations/lt.d.ts +0 -8
- package/dist/translations/lt.js +0 -5
- package/dist/translations/lv.d.ts +0 -8
- package/dist/translations/lv.js +0 -5
- package/dist/translations/ms.d.ts +0 -8
- package/dist/translations/ms.js +0 -5
- package/dist/translations/ne.d.ts +0 -8
- package/dist/translations/ne.js +0 -5
- package/dist/translations/nl.d.ts +0 -8
- package/dist/translations/nl.js +0 -5
- package/dist/translations/no.d.ts +0 -8
- package/dist/translations/no.js +0 -5
- package/dist/translations/pl.d.ts +0 -8
- package/dist/translations/pl.js +0 -5
- package/dist/translations/pt-br.d.ts +0 -8
- package/dist/translations/pt-br.js +0 -5
- package/dist/translations/pt.d.ts +0 -8
- package/dist/translations/pt.js +0 -5
- package/dist/translations/ro.d.ts +0 -8
- package/dist/translations/ro.js +0 -5
- package/dist/translations/ru.d.ts +0 -8
- package/dist/translations/ru.js +0 -5
- package/dist/translations/sk.d.ts +0 -8
- package/dist/translations/sk.js +0 -5
- package/dist/translations/sq.d.ts +0 -8
- package/dist/translations/sq.js +0 -5
- package/dist/translations/sr-latn.d.ts +0 -8
- package/dist/translations/sr-latn.js +0 -5
- package/dist/translations/sr.d.ts +0 -8
- package/dist/translations/sr.js +0 -5
- package/dist/translations/sv.d.ts +0 -8
- package/dist/translations/sv.js +0 -5
- package/dist/translations/th.d.ts +0 -8
- package/dist/translations/th.js +0 -5
- package/dist/translations/tk.d.ts +0 -8
- package/dist/translations/tk.js +0 -5
- package/dist/translations/tr.d.ts +0 -8
- package/dist/translations/tr.js +0 -5
- package/dist/translations/ug.d.ts +0 -8
- package/dist/translations/ug.js +0 -5
- package/dist/translations/uk.d.ts +0 -8
- package/dist/translations/uk.js +0 -5
- package/dist/translations/ur.d.ts +0 -8
- package/dist/translations/ur.js +0 -5
- package/dist/translations/vi.d.ts +0 -8
- package/dist/translations/vi.js +0 -5
- package/dist/translations/zh-cn.d.ts +0 -8
- package/dist/translations/zh-cn.js +0 -5
- package/dist/translations/zh.d.ts +0 -8
- package/dist/translations/zh.js +0 -5
- package/dist/types/augmentation.d.ts +0 -23
- package/dist/types/index.d.ts +0 -14
- package/dist/types/utils.d.ts +0 -18
- package/dist/types/wordcount.d.ts +0 -139
- package/dist/types/wordcountconfig.d.ts +0 -96
@@ -1,96 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
-
*/
|
9
|
-
/**
|
10
|
-
* @module word-count/wordcountconfig
|
11
|
-
*/
|
12
|
-
/**
|
13
|
-
* The configuration of the word count feature.
|
14
|
-
*
|
15
|
-
* ```ts
|
16
|
-
* ClassicEditor
|
17
|
-
* .create( {
|
18
|
-
* wordCount: ... // Word count feature configuration.
|
19
|
-
* } )
|
20
|
-
* .then( ... )
|
21
|
-
* .catch( ... );
|
22
|
-
* ```
|
23
|
-
*
|
24
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
25
|
-
*/
|
26
|
-
export interface WordCountConfig {
|
27
|
-
/**
|
28
|
-
* This option allows for hiding the word counter. The element obtained through
|
29
|
-
* {@link module:word-count/wordcount~WordCount#wordCountContainer} will only preserve
|
30
|
-
* the characters part. Word counter is displayed by default when this configuration option is not defined.
|
31
|
-
*
|
32
|
-
* ```ts
|
33
|
-
* const wordCountConfig = {
|
34
|
-
* displayWords: false
|
35
|
-
* };
|
36
|
-
* ```
|
37
|
-
*
|
38
|
-
* The configuration above will result in the following container:
|
39
|
-
*
|
40
|
-
* ```html
|
41
|
-
* <div class="ck ck-word-count">
|
42
|
-
* <div class="ck-word-count__characters">Characters: 28</div>
|
43
|
-
* </div>
|
44
|
-
* ```
|
45
|
-
*/
|
46
|
-
displayWords?: boolean;
|
47
|
-
/**
|
48
|
-
* This option allows for hiding the character counter. The element obtained through
|
49
|
-
* {@link module:word-count/wordcount~WordCount#wordCountContainer} will only preserve
|
50
|
-
* the words part. Character counter is displayed by default when this configuration option is not defined.
|
51
|
-
*
|
52
|
-
* ```ts
|
53
|
-
* const wordCountConfig = {
|
54
|
-
* displayCharacters: false
|
55
|
-
* };
|
56
|
-
* ```
|
57
|
-
*
|
58
|
-
* The configuration above will result in the following container:
|
59
|
-
*
|
60
|
-
* ```html
|
61
|
-
* <div class="ck ck-word-count">
|
62
|
-
* <div class="ck-word-count__words">Words: 4</div>
|
63
|
-
* </div>
|
64
|
-
* ```
|
65
|
-
*/
|
66
|
-
displayCharacters?: boolean;
|
67
|
-
/**
|
68
|
-
* This configuration takes a function that is executed whenever the word count plugin updates its values.
|
69
|
-
* This function is called with one argument, which is an object with the `words` and `characters` keys containing
|
70
|
-
* the number of detected words and characters in the document.
|
71
|
-
*
|
72
|
-
* ```ts
|
73
|
-
* const wordCountConfig = {
|
74
|
-
* onUpdate: function( stats ) {
|
75
|
-
* doSthWithWordNumber( stats.words );
|
76
|
-
* doSthWithCharacterNumber( stats.characters );
|
77
|
-
* }
|
78
|
-
* };
|
79
|
-
* ```
|
80
|
-
*/
|
81
|
-
onUpdate?: (data: {
|
82
|
-
words: number;
|
83
|
-
characters: number;
|
84
|
-
}) => void;
|
85
|
-
/**
|
86
|
-
* Allows for providing the HTML element that the
|
87
|
-
* {@link module:word-count/wordcount~WordCount#wordCountContainer word count container} will be appended to automatically.
|
88
|
-
*
|
89
|
-
* ```ts
|
90
|
-
* const wordCountConfig = {
|
91
|
-
* container: document.getElementById( 'container-for-word-count' );
|
92
|
-
* };
|
93
|
-
* ```
|
94
|
-
*/
|
95
|
-
container?: HTMLElement;
|
96
|
-
}
|