@ckeditor/ckeditor5-word-count 41.3.0 → 41.4.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.js +204 -0
- package/dist/index.js.map +1 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hy.d.ts +8 -0
- package/dist/translations/hy.js +5 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/types/augmentation.d.ts +23 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/utils.d.ts +18 -0
- package/dist/types/wordcount.d.ts +139 -0
- package/dist/types/wordcountconfig.d.ts +96 -0
- package/package.json +3 -2
- package/src/index.d.ts +1 -1
package/dist/index.css
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1,204 @@
|
|
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
|
+
import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
|
6
|
+
import { Template, View } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
7
|
+
import { env } from '@ckeditor/ckeditor5-utils/dist/index.js';
|
8
|
+
import { throttle, isElement } from 'lodash-es';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
12
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
13
|
+
*/ /**
|
14
|
+
* Returns a plain text representation of an element and its children.
|
15
|
+
*
|
16
|
+
* @returns Plain text representing the model's data.
|
17
|
+
*/ function modelElementToPlainText(item) {
|
18
|
+
if (item.is('$text') || item.is('$textProxy')) {
|
19
|
+
return item.data;
|
20
|
+
}
|
21
|
+
const element = item;
|
22
|
+
let text = '';
|
23
|
+
let prev = null;
|
24
|
+
for (const child of element.getChildren()){
|
25
|
+
const childText = modelElementToPlainText(child);
|
26
|
+
// If last block was finish, start from new line.
|
27
|
+
if (prev && prev.is('element')) {
|
28
|
+
text += '\n';
|
29
|
+
}
|
30
|
+
text += childText;
|
31
|
+
prev = child;
|
32
|
+
}
|
33
|
+
return text;
|
34
|
+
}
|
35
|
+
|
36
|
+
class WordCount extends Plugin {
|
37
|
+
/**
|
38
|
+
* @inheritDoc
|
39
|
+
*/ static get pluginName() {
|
40
|
+
return 'WordCount';
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* @inheritDoc
|
44
|
+
*/ init() {
|
45
|
+
const editor = this.editor;
|
46
|
+
editor.model.document.on('change:data', throttle(this._refreshStats.bind(this), 250));
|
47
|
+
if (typeof this._config.onUpdate == 'function') {
|
48
|
+
this.on('update', (evt, data)=>{
|
49
|
+
this._config.onUpdate(data);
|
50
|
+
});
|
51
|
+
}
|
52
|
+
if (isElement(this._config.container)) {
|
53
|
+
this._config.container.appendChild(this.wordCountContainer);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* @inheritDoc
|
58
|
+
*/ destroy() {
|
59
|
+
if (this._outputView) {
|
60
|
+
this._outputView.element.remove();
|
61
|
+
this._outputView.destroy();
|
62
|
+
}
|
63
|
+
super.destroy();
|
64
|
+
}
|
65
|
+
/**
|
66
|
+
* Creates a self-updating HTML element. Repeated executions return the same element.
|
67
|
+
* The returned element has the following HTML structure:
|
68
|
+
*
|
69
|
+
* ```html
|
70
|
+
* <div class="ck ck-word-count">
|
71
|
+
* <div class="ck-word-count__words">Words: 4</div>
|
72
|
+
* <div class="ck-word-count__characters">Characters: 28</div>
|
73
|
+
* </div>
|
74
|
+
* ```
|
75
|
+
*/ get wordCountContainer() {
|
76
|
+
const editor = this.editor;
|
77
|
+
const t = editor.t;
|
78
|
+
const displayWords = editor.config.get('wordCount.displayWords');
|
79
|
+
const displayCharacters = editor.config.get('wordCount.displayCharacters');
|
80
|
+
const bind = Template.bind(this, this);
|
81
|
+
const children = [];
|
82
|
+
if (!this._outputView) {
|
83
|
+
this._outputView = new View();
|
84
|
+
if (displayWords || displayWords === undefined) {
|
85
|
+
this.bind('_wordsLabel').to(this, 'words', (words)=>{
|
86
|
+
return t('Words: %0', words);
|
87
|
+
});
|
88
|
+
children.push({
|
89
|
+
tag: 'div',
|
90
|
+
children: [
|
91
|
+
{
|
92
|
+
text: [
|
93
|
+
bind.to('_wordsLabel')
|
94
|
+
]
|
95
|
+
}
|
96
|
+
],
|
97
|
+
attributes: {
|
98
|
+
class: 'ck-word-count__words'
|
99
|
+
}
|
100
|
+
});
|
101
|
+
}
|
102
|
+
if (displayCharacters || displayCharacters === undefined) {
|
103
|
+
this.bind('_charactersLabel').to(this, 'characters', (words)=>{
|
104
|
+
return t('Characters: %0', words);
|
105
|
+
});
|
106
|
+
children.push({
|
107
|
+
tag: 'div',
|
108
|
+
children: [
|
109
|
+
{
|
110
|
+
text: [
|
111
|
+
bind.to('_charactersLabel')
|
112
|
+
]
|
113
|
+
}
|
114
|
+
],
|
115
|
+
attributes: {
|
116
|
+
class: 'ck-word-count__characters'
|
117
|
+
}
|
118
|
+
});
|
119
|
+
}
|
120
|
+
this._outputView.setTemplate({
|
121
|
+
tag: 'div',
|
122
|
+
attributes: {
|
123
|
+
class: [
|
124
|
+
'ck',
|
125
|
+
'ck-word-count'
|
126
|
+
]
|
127
|
+
},
|
128
|
+
children
|
129
|
+
});
|
130
|
+
this._outputView.render();
|
131
|
+
}
|
132
|
+
return this._outputView.element;
|
133
|
+
}
|
134
|
+
_getText() {
|
135
|
+
let txt = '';
|
136
|
+
for (const root of this.editor.model.document.getRoots()){
|
137
|
+
if (txt !== '') {
|
138
|
+
// Add a delimiter, so words from each root are treated independently.
|
139
|
+
txt += '\n';
|
140
|
+
}
|
141
|
+
txt += modelElementToPlainText(root);
|
142
|
+
}
|
143
|
+
return txt;
|
144
|
+
}
|
145
|
+
/**
|
146
|
+
* Determines the number of characters in the current editor's model.
|
147
|
+
*/ _getCharacters(txt) {
|
148
|
+
return txt.replace(/\n/g, '').length;
|
149
|
+
}
|
150
|
+
/**
|
151
|
+
* Determines the number of words in the current editor's model.
|
152
|
+
*/ _getWords(txt) {
|
153
|
+
const detectedWords = txt.match(this._wordsMatchRegExp) || [];
|
154
|
+
return detectedWords.length;
|
155
|
+
}
|
156
|
+
/**
|
157
|
+
* Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.
|
158
|
+
* It also fires the {@link #event:update}.
|
159
|
+
*
|
160
|
+
* @fires update
|
161
|
+
*/ _refreshStats() {
|
162
|
+
const txt = this._getText();
|
163
|
+
const words = this.words = this._getWords(txt);
|
164
|
+
const characters = this.characters = this._getCharacters(txt);
|
165
|
+
this.fire('update', {
|
166
|
+
words,
|
167
|
+
characters
|
168
|
+
});
|
169
|
+
}
|
170
|
+
/**
|
171
|
+
* @inheritDoc
|
172
|
+
*/ constructor(editor){
|
173
|
+
super(editor);
|
174
|
+
this.set('characters', 0);
|
175
|
+
this.set('words', 0);
|
176
|
+
// Don't wait for the #update event to set the value of the properties but obtain it right away.
|
177
|
+
// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.
|
178
|
+
// If not accessed directly, the properties will be refreshed upon #update anyway.
|
179
|
+
Object.defineProperties(this, {
|
180
|
+
characters: {
|
181
|
+
get () {
|
182
|
+
return this.characters = this._getCharacters(this._getText());
|
183
|
+
}
|
184
|
+
},
|
185
|
+
words: {
|
186
|
+
get () {
|
187
|
+
return this.words = this._getWords(this._getText());
|
188
|
+
}
|
189
|
+
}
|
190
|
+
});
|
191
|
+
this.set('_wordsLabel', undefined);
|
192
|
+
this.set('_charactersLabel', undefined);
|
193
|
+
this._config = editor.config.get('wordCount') || {};
|
194
|
+
this._outputView = undefined;
|
195
|
+
this._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).
|
196
|
+
// Groups:
|
197
|
+
// {L} - Any kind of letter from any language.
|
198
|
+
// {N} - Any kind of numeric character in any script.
|
199
|
+
new RegExp('([\\p{L}\\p{N}]+\\S?)+', 'gu') : /([a-zA-Z0-9À-ž]+\S?)+/gu;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
export { WordCount };
|
204
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.js","../src/utils.ts","../src/wordcount.ts"],"names":["modelElementToPlainText","item","is","data","element","text","prev","child","getChildren","childText","WordCount","Plugin","pluginName","init","editor","model","document","on","throttle","_refreshStats","bind","_config","onUpdate","evt","isElement","container","appendChild","wordCountContainer","destroy","_outputView","remove","t","displayWords","config","get","displayCharacters","Template","children","View","undefined","to","words","push","tag","attributes","class","setTemplate","render","_getText","txt","root","getRoots","_getCharacters","replace","length","_getWords","detectedWords","match","_wordsMatchRegExp","characters","fire","constructor","set","Object","defineProperties","env","features","isRegExpUnicodePropertySupported","RegExp"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CA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,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;AACtD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;AAC7D,CE1DG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAIC,MAAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0B,CACtC,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;AACF,CAAA,CAAA,CAAA,CAAA,CAAA;AAkKA,CAAA;AFvGD;AACA,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Template, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { env } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */ function modelElementToPlainText(item) {\n if (item.is('$text') || item.is('$textProxy')) {\n return item.data;\n }\n const element = item;\n let text = '';\n let prev = null;\n for (const child of element.getChildren()){\n const childText = modelElementToPlainText(child);\n // If last block was finish, start from new line.\n if (prev && prev.is('element')) {\n text += '\\n';\n }\n text += childText;\n prev = child;\n }\n return text;\n}\n\nclass WordCount extends Plugin {\n /**\n * @inheritDoc\n */ static get pluginName() {\n return 'WordCount';\n }\n /**\n * @inheritDoc\n */ init() {\n const editor = this.editor;\n editor.model.document.on('change:data', throttle(this._refreshStats.bind(this), 250));\n if (typeof this._config.onUpdate == 'function') {\n this.on('update', (evt, data)=>{\n this._config.onUpdate(data);\n });\n }\n if (isElement(this._config.container)) {\n this._config.container.appendChild(this.wordCountContainer);\n }\n }\n /**\n * @inheritDoc\n */ destroy() {\n if (this._outputView) {\n this._outputView.element.remove();\n this._outputView.destroy();\n }\n super.destroy();\n }\n /**\n * Creates a self-updating HTML element. Repeated executions return the same element.\n * The returned element has the following HTML structure:\n *\n * ```html\n * <div class=\"ck ck-word-count\">\n * \t<div class=\"ck-word-count__words\">Words: 4</div>\n * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n * </div>\n * ```\n */ get wordCountContainer() {\n const editor = this.editor;\n const t = editor.t;\n const displayWords = editor.config.get('wordCount.displayWords');\n const displayCharacters = editor.config.get('wordCount.displayCharacters');\n const bind = Template.bind(this, this);\n const children = [];\n if (!this._outputView) {\n this._outputView = new View();\n if (displayWords || displayWords === undefined) {\n this.bind('_wordsLabel').to(this, 'words', (words)=>{\n return t('Words: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_wordsLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__words'\n }\n });\n }\n if (displayCharacters || displayCharacters === undefined) {\n this.bind('_charactersLabel').to(this, 'characters', (words)=>{\n return t('Characters: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_charactersLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__characters'\n }\n });\n }\n this._outputView.setTemplate({\n tag: 'div',\n attributes: {\n class: [\n 'ck',\n 'ck-word-count'\n ]\n },\n children\n });\n this._outputView.render();\n }\n return this._outputView.element;\n }\n _getText() {\n let txt = '';\n for (const root of this.editor.model.document.getRoots()){\n if (txt !== '') {\n // Add a delimiter, so words from each root are treated independently.\n txt += '\\n';\n }\n txt += modelElementToPlainText(root);\n }\n return txt;\n }\n /**\n * Determines the number of characters in the current editor's model.\n */ _getCharacters(txt) {\n return txt.replace(/\\n/g, '').length;\n }\n /**\n * Determines the number of words in the current editor's model.\n */ _getWords(txt) {\n const detectedWords = txt.match(this._wordsMatchRegExp) || [];\n return detectedWords.length;\n }\n /**\n * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n * It also fires the {@link #event:update}.\n *\n * @fires update\n */ _refreshStats() {\n const txt = this._getText();\n const words = this.words = this._getWords(txt);\n const characters = this.characters = this._getCharacters(txt);\n this.fire('update', {\n words,\n characters\n });\n }\n /**\n * @inheritDoc\n */ constructor(editor){\n super(editor);\n this.set('characters', 0);\n this.set('words', 0);\n // Don't wait for the #update event to set the value of the properties but obtain it right away.\n // This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n // If not accessed directly, the properties will be refreshed upon #update anyway.\n Object.defineProperties(this, {\n characters: {\n get () {\n return this.characters = this._getCharacters(this._getText());\n }\n },\n words: {\n get () {\n return this.words = this._getWords(this._getText());\n }\n }\n });\n this.set('_wordsLabel', undefined);\n this.set('_charactersLabel', undefined);\n this._config = editor.config.get('wordCount') || {};\n this._outputView = undefined;\n this._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n // Groups:\n // {L} - Any kind of letter from any language.\n // {N} - Any kind of numeric character in any script.\n new RegExp('([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu') : /([a-zA-Z0-9À-ž]+\\S?)+/gu;\n }\n}\n\nexport { WordCount };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/utils\n */\n\nimport type { Element, Item } from 'ckeditor5/src/engine.js';\n\n/**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */\nexport function modelElementToPlainText( item: Item ): string {\n\tif ( item.is( '$text' ) || item.is( '$textProxy' ) ) {\n\t\treturn item.data;\n\t}\n\n\tconst element = item as Element;\n\tlet text = '';\n\tlet prev = null;\n\n\tfor ( const child of element.getChildren() ) {\n\t\tconst childText = modelElementToPlainText( child );\n\n\t\t// If last block was finish, start from new line.\n\t\tif ( prev && prev.is( 'element' ) ) {\n\t\t\ttext += '\\n';\n\t\t}\n\n\t\ttext += childText;\n\n\t\tprev = child;\n\t}\n\n\treturn text;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/wordcount\n */\n\nimport { type DocumentChangeEvent } from 'ckeditor5/src/engine.js';\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { Template, View } from 'ckeditor5/src/ui.js';\nimport { env } from 'ckeditor5/src/utils.js';\n\nimport { modelElementToPlainText } from './utils.js';\nimport type { WordCountConfig } from './wordcountconfig.js';\n\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */\nexport default class WordCount extends Plugin {\n\t/**\n\t * The number of characters in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public characters: number;\n\n\t/**\n\t * The number of words in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public words: number;\n\n\t/**\n\t * The label used to display the words value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _wordsLabel: string | undefined;\n\n\t/**\n\t * The label used to display the characters value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _charactersLabel: string | undefined;\n\n\t/**\n\t * The configuration of this plugin.\n\t */\n\tprivate _config: WordCountConfig;\n\n\t/**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */\n\tprivate _outputView: View | undefined;\n\n\t/**\n\t * A regular expression used to recognize words in the editor's content.\n\t */\n\tprivate readonly _wordsMatchRegExp: RegExp;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'characters', 0 );\n\t\tthis.set( 'words', 0 );\n\n\t\t// Don't wait for the #update event to set the value of the properties but obtain it right away.\n\t\t// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n\t\t// If not accessed directly, the properties will be refreshed upon #update anyway.\n\t\tObject.defineProperties( this, {\n\t\t\tcharacters: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.characters = this._getCharacters( this._getText() ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\twords: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.words = this._getWords( this._getText() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( '_wordsLabel', undefined );\n\t\tthis.set( '_charactersLabel', undefined );\n\n\t\tthis._config = editor.config.get( 'wordCount' ) || {};\n\n\t\tthis._outputView = undefined;\n\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ?\n\t\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\t\t// Groups:\n\t\t\t// {L} - Any kind of letter from any language.\n\t\t\t// {N} - Any kind of numeric character in any script.\n\t\t\tnew RegExp( '([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu' ) :\n\t\t\t/([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WordCount' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.on<DocumentChangeEvent>( 'change:data', throttle( this._refreshStats.bind( this ), 250 ) );\n\n\t\tif ( typeof this._config.onUpdate == 'function' ) {\n\t\t\tthis.on<WordCountUpdateEvent>( 'update', ( evt, data ) => {\n\t\t\t\tthis._config.onUpdate!( data );\n\t\t\t} );\n\t\t}\n\n\t\tif ( isElement( this._config.container ) ) {\n\t\t\tthis._config.container!.appendChild( this.wordCountContainer );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._outputView ) {\n\t\t\tthis._outputView.element!.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */\n\tpublic get wordCountContainer(): HTMLElement {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get( 'wordCount.displayWords' );\n\t\tconst displayCharacters = editor.config.get( 'wordCount.displayCharacters' );\n\t\tconst bind = Template.bind( this, this );\n\t\tconst children = [];\n\n\t\tif ( !this._outputView ) {\n\t\t\tthis._outputView = new View();\n\n\t\t\tif ( displayWords || displayWords === undefined ) {\n\t\t\t\tthis.bind( '_wordsLabel' ).to( this, 'words', words => {\n\t\t\t\t\treturn t( 'Words: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_wordsLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__words'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( displayCharacters || displayCharacters === undefined ) {\n\t\t\t\tthis.bind( '_charactersLabel' ).to( this, 'characters', words => {\n\t\t\t\t\treturn t( 'Characters: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_charactersLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__characters'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._outputView.setTemplate( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-word-count'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t} );\n\n\t\t\tthis._outputView.render();\n\t\t}\n\n\t\treturn this._outputView.element!;\n\t}\n\n\tprivate _getText(): string {\n\t\tlet txt = '';\n\n\t\tfor ( const root of this.editor.model.document.getRoots() ) {\n\t\t\tif ( txt !== '' ) {\n\t\t\t\t// Add a delimiter, so words from each root are treated independently.\n\t\t\t\ttxt += '\\n';\n\t\t\t}\n\n\t\t\ttxt += modelElementToPlainText( root );\n\t\t}\n\n\t\treturn txt;\n\t}\n\n\t/**\n\t * Determines the number of characters in the current editor's model.\n\t */\n\tprivate _getCharacters( txt: string ): number {\n\t\treturn txt.replace( /\\n/g, '' ).length;\n\t}\n\n\t/**\n\t * Determines the number of words in the current editor's model.\n\t */\n\tprivate _getWords( txt: string ): number {\n\t\tconst detectedWords = txt.match( this._wordsMatchRegExp ) || [];\n\n\t\treturn detectedWords.length;\n\t}\n\n\t/**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */\n\tprivate _refreshStats(): void {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords( txt );\n\t\tconst characters = this.characters = this._getCharacters( txt );\n\n\t\tthis.fire<WordCountUpdateEvent>( 'update', {\n\t\t\twords,\n\t\t\tcharacters\n\t\t} );\n\t}\n}\n\n/**\n * An event fired after {@link ~WordCount#words} and {@link ~WordCount#characters} are updated.\n *\n * @eventName ~WordCount#update\n */\nexport type WordCountUpdateEvent = {\n\tname: 'update';\n\targs: [ { words: number; characters: number } ];\n};\n"]}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"ar":{"dictionary":{"Words: %0":"الكلمات: %0","Characters: %0":"الأحرف: %0"},getPluralForm(n){return n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"az":{"dictionary":{"Words: %0":"Sözlər: %0","Characters: %0":"Simvolar: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"bg":{"dictionary":{"Words: %0":"Думи: %0","Characters: %0":"Знаци: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"bn":{"dictionary":{"Words: %0":"শব্দগুলোঃ %0","Characters: %0":"অক্ষরসমূহঃ %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"ca":{"dictionary":{"Words: %0":"Paraules: %0","Characters: %0":"Caràcters: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"cs":{"dictionary":{"Words: %0":"Počet slov: %0","Characters: %0":"Počet znaků: %0"},getPluralForm(n){return (n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"da":{"dictionary":{"Words: %0":"Ord: %0","Characters: %0":"Karakterer: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"de-ch":{"dictionary":{"Words: %0":"Wörter: %0","Characters: %0":"Zeichen: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"de":{"dictionary":{"Words: %0":"Wörter: %0 ","Characters: %0":"Zeichen: %0 "},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"el":{"dictionary":{"Words: %0":"Λέξεις: %0","Characters: %0":"Χαρακτήρες: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"en-au":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"en-gb":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"en":{"dictionary":{"Words: %0":"Words: %0","Characters: %0":"Characters: %0"},"getPluralForm":null}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"es-co":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"es":{"dictionary":{"Words: %0":"Palabras: %0","Characters: %0":"Caracteres: %0"},getPluralForm(n){return n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"et":{"dictionary":{"Words: %0":"Sõnu: %0","Characters: %0":"Märke: %0"},getPluralForm(n){return (n != 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"fa":{"dictionary":{"Words: %0":"تعداد لغات : %0","Characters: %0":"تعداد حروف : %0"},getPluralForm(n){return (n > 1);}}}
|
@@ -0,0 +1,8 @@
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export default {"fi":{"dictionary":{"Words: %0":"Sanoja: %0","Characters: %0":"Merkkejä: %0"},getPluralForm(n){return (n != 1);}}}
|