@ckeditor/ckeditor5-word-count 48.2.0-alpha.7 → 48.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,92 +1,92 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module word-count/wordcountconfig
7
- */
6
+ * @module word-count/wordcountconfig
7
+ */
8
8
  /**
9
- * The configuration of the word count feature.
10
- *
11
- * ```ts
12
- * ClassicEditor
13
- * .create( {
14
- * wordCount: ... // Word count feature configuration.
15
- * } )
16
- * .then( ... )
17
- * .catch( ... );
18
- * ```
19
- *
20
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
21
- */
9
+ * The configuration of the word count feature.
10
+ *
11
+ * ```ts
12
+ * ClassicEditor
13
+ * .create( {
14
+ * wordCount: ... // Word count feature configuration.
15
+ * } )
16
+ * .then( ... )
17
+ * .catch( ... );
18
+ * ```
19
+ *
20
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
21
+ */
22
22
  export interface WordCountConfig {
23
- /**
24
- * This option allows for hiding the word counter. The element obtained through
25
- * {@link module:word-count/wordcount~WordCount#wordCountContainer} will only preserve
26
- * the characters part. Word counter is displayed by default when this configuration option is not defined.
27
- *
28
- * ```ts
29
- * const wordCountConfig = {
30
- * displayWords: false
31
- * };
32
- * ```
33
- *
34
- * The configuration above will result in the following container:
35
- *
36
- * ```html
37
- * <div class="ck ck-word-count">
38
- * <div class="ck-word-count__characters">Characters: 28</div>
39
- * </div>
40
- * ```
41
- */
42
- displayWords?: boolean;
43
- /**
44
- * This option allows for hiding the character counter. The element obtained through
45
- * {@link module:word-count/wordcount~WordCount#wordCountContainer} will only preserve
46
- * the words part. Character counter is displayed by default when this configuration option is not defined.
47
- *
48
- * ```ts
49
- * const wordCountConfig = {
50
- * displayCharacters: false
51
- * };
52
- * ```
53
- *
54
- * The configuration above will result in the following container:
55
- *
56
- * ```html
57
- * <div class="ck ck-word-count">
58
- * <div class="ck-word-count__words">Words: 4</div>
59
- * </div>
60
- * ```
61
- */
62
- displayCharacters?: boolean;
63
- /**
64
- * This configuration takes a function that is executed whenever the word count plugin updates its values.
65
- * This function is called with one argument, which is an object with the `words` and `characters` keys containing
66
- * the number of detected words and characters in the document.
67
- *
68
- * ```ts
69
- * const wordCountConfig = {
70
- * onUpdate: function( stats ) {
71
- * doSthWithWordNumber( stats.words );
72
- * doSthWithCharacterNumber( stats.characters );
73
- * }
74
- * };
75
- * ```
76
- */
77
- onUpdate?: (data: {
78
- words: number;
79
- characters: number;
80
- }) => void;
81
- /**
82
- * Allows for providing the HTML element that the
83
- * {@link module:word-count/wordcount~WordCount#wordCountContainer word count container} will be appended to automatically.
84
- *
85
- * ```ts
86
- * const wordCountConfig = {
87
- * container: document.getElementById( 'container-for-word-count' );
88
- * };
89
- * ```
90
- */
91
- container?: HTMLElement;
23
+ /**
24
+ * This option allows for hiding the word counter. The element obtained through
25
+ * {@link module:word-count/wordcount~WordCount#wordCountContainer} will only preserve
26
+ * the characters part. Word counter is displayed by default when this configuration option is not defined.
27
+ *
28
+ * ```ts
29
+ * const wordCountConfig = {
30
+ * displayWords: false
31
+ * };
32
+ * ```
33
+ *
34
+ * The configuration above will result in the following container:
35
+ *
36
+ * ```html
37
+ * <div class="ck ck-word-count">
38
+ * <div class="ck-word-count__characters">Characters: 28</div>
39
+ * </div>
40
+ * ```
41
+ */
42
+ displayWords?: boolean;
43
+ /**
44
+ * This option allows for hiding the character counter. The element obtained through
45
+ * {@link module:word-count/wordcount~WordCount#wordCountContainer} will only preserve
46
+ * the words part. Character counter is displayed by default when this configuration option is not defined.
47
+ *
48
+ * ```ts
49
+ * const wordCountConfig = {
50
+ * displayCharacters: false
51
+ * };
52
+ * ```
53
+ *
54
+ * The configuration above will result in the following container:
55
+ *
56
+ * ```html
57
+ * <div class="ck ck-word-count">
58
+ * <div class="ck-word-count__words">Words: 4</div>
59
+ * </div>
60
+ * ```
61
+ */
62
+ displayCharacters?: boolean;
63
+ /**
64
+ * This configuration takes a function that is executed whenever the word count plugin updates its values.
65
+ * This function is called with one argument, which is an object with the `words` and `characters` keys containing
66
+ * the number of detected words and characters in the document.
67
+ *
68
+ * ```ts
69
+ * const wordCountConfig = {
70
+ * onUpdate: function( stats ) {
71
+ * doSthWithWordNumber( stats.words );
72
+ * doSthWithCharacterNumber( stats.characters );
73
+ * }
74
+ * };
75
+ * ```
76
+ */
77
+ onUpdate?: (data: {
78
+ words: number;
79
+ characters: number;
80
+ }) => void;
81
+ /**
82
+ * Allows for providing the HTML element that the
83
+ * {@link module:word-count/wordcount~WordCount#wordCountContainer word count container} will be appended to automatically.
84
+ *
85
+ * ```ts
86
+ * const wordCountConfig = {
87
+ * container: document.getElementById( 'container-for-word-count' );
88
+ * };
89
+ * ```
90
+ */
91
+ container?: HTMLElement;
92
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-word-count",
3
- "version": "48.2.0-alpha.7",
3
+ "version": "48.3.0-alpha.0",
4
4
  "description": "Word and character count feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -26,10 +26,10 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-core": "48.2.0-alpha.7",
30
- "@ckeditor/ckeditor5-engine": "48.2.0-alpha.7",
31
- "@ckeditor/ckeditor5-ui": "48.2.0-alpha.7",
32
- "@ckeditor/ckeditor5-utils": "48.2.0-alpha.7",
29
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
30
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.0",
31
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.0",
32
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.0",
33
33
  "es-toolkit": "1.45.1"
34
34
  },
35
35
  "files": [
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index.css.map */"]}