@ckbox/i18n 2.11.0-rc.1 → 2.11.1
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.
- package/README.md +42 -53
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Using a build served from the CDN is the simplest and fastest way of embedding C
|
|
|
13
13
|
To start using CKBox on your website, embed the following `script` element in the HTML code of the page:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script src="https://cdn.ckbox.io/ckbox/2.11.
|
|
16
|
+
<script src="https://cdn.ckbox.io/ckbox/2.11.1/ckbox.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Quick implementation example:
|
|
@@ -23,7 +23,7 @@ Quick implementation example:
|
|
|
23
23
|
<html>
|
|
24
24
|
<head>
|
|
25
25
|
<meta charset="UTF-8" />
|
|
26
|
-
<script src="https://cdn.ckbox.io/ckbox/2.11.
|
|
26
|
+
<script src="https://cdn.ckbox.io/ckbox/2.11.1/ckbox.js"></script>
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<div id="ckbox"></div>
|
|
@@ -48,12 +48,12 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
48
48
|
<html>
|
|
49
49
|
<head>
|
|
50
50
|
<meta charset="UTF-8" />
|
|
51
|
-
<script src="https://cdn.ckbox.io/ckbox/2.11.
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/2.11.1/ckbox.js"></script>
|
|
52
52
|
<link
|
|
53
53
|
rel="stylesheet"
|
|
54
|
-
href="https://cdn.ckbox.io/ckbox/2.11.
|
|
54
|
+
href="https://cdn.ckbox.io/ckbox/2.11.1/styles/themes/lark.css"
|
|
55
55
|
/>
|
|
56
|
-
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/
|
|
56
|
+
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/47.6.1/ckeditor5.css" />
|
|
57
57
|
</head>
|
|
58
58
|
<body>
|
|
59
59
|
<div id="editor"></div>
|
|
@@ -61,8 +61,8 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
61
61
|
<script type="importmap">
|
|
62
62
|
{
|
|
63
63
|
"imports": {
|
|
64
|
-
"ckeditor5": "https://cdn.ckeditor.com/ckeditor5/
|
|
65
|
-
"ckeditor5/": "https://cdn.ckeditor.com/ckeditor5/
|
|
64
|
+
"ckeditor5": "https://cdn.ckeditor.com/ckeditor5/47.6.1/ckeditor5.js",
|
|
65
|
+
"ckeditor5/": "https://cdn.ckeditor.com/ckeditor5/47.6.1/"
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
</script>
|
|
@@ -70,57 +70,46 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
70
70
|
<script type="module">
|
|
71
71
|
import {
|
|
72
72
|
ClassicEditor,
|
|
73
|
-
CKBox,
|
|
74
|
-
Bold,
|
|
75
|
-
CloudServices,
|
|
76
73
|
Essentials,
|
|
77
|
-
|
|
74
|
+
CloudServices,
|
|
75
|
+
CKBox,
|
|
76
|
+
CKBoxImageEdit,
|
|
77
|
+
PictureEditing,
|
|
78
78
|
Image,
|
|
79
|
+
ImageUpload,
|
|
79
80
|
ImageUploadEditing,
|
|
80
81
|
ImageUploadProgress,
|
|
81
|
-
Italic,
|
|
82
82
|
LinkEditing,
|
|
83
|
+
Heading,
|
|
84
|
+
Font,
|
|
85
|
+
Bold,
|
|
86
|
+
Italic,
|
|
87
|
+
BlockQuote,
|
|
83
88
|
Paragraph,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"ckbox",
|
|
109
|
-
"|",
|
|
110
|
-
"undo",
|
|
111
|
-
"redo",
|
|
112
|
-
"|",
|
|
113
|
-
"bold",
|
|
114
|
-
"italic",
|
|
115
|
-
"|",
|
|
116
|
-
"fontSize",
|
|
117
|
-
"fontFamily",
|
|
118
|
-
"fontColor",
|
|
119
|
-
"fontBackgroundColor",
|
|
120
|
-
],
|
|
121
|
-
}).catch((error) => {
|
|
122
|
-
console.error(error);
|
|
123
|
-
});
|
|
89
|
+
Indent,
|
|
90
|
+
Link,
|
|
91
|
+
List
|
|
92
|
+
} from 'ckeditor5';
|
|
93
|
+
|
|
94
|
+
ClassicEditor
|
|
95
|
+
.create( document.querySelector( '#editor' ), {
|
|
96
|
+
plugins: [
|
|
97
|
+
CKBox, CloudServices, Essentials, Bold, Italic, Font, Paragraph, LinkEditing,
|
|
98
|
+
PictureEditing, Image, ImageUploadEditing, ImageUploadProgress, BlockQuote,
|
|
99
|
+
Indent, Heading, Link, List, CKBoxImageEdit, ImageUpload
|
|
100
|
+
],
|
|
101
|
+
ckbox: {
|
|
102
|
+
tokenUrl: 'https://your.token.url',
|
|
103
|
+
theme: 'lark',
|
|
104
|
+
},
|
|
105
|
+
toolbar: [
|
|
106
|
+
'ckbox', 'imageUpload', '|', 'heading', '|', 'undo', 'redo', '|', 'bold', 'italic', '|',
|
|
107
|
+
'blockQuote', 'indent', 'link', '|', 'bulletedList', 'numberedList'
|
|
108
|
+
],
|
|
109
|
+
} )
|
|
110
|
+
.catch( error => {
|
|
111
|
+
console.error( error );
|
|
112
|
+
} );
|
|
124
113
|
</script>
|
|
125
114
|
</body>
|
|
126
115
|
</html>
|
|
@@ -142,7 +131,7 @@ You will find ready to use code snippets and live examples there.
|
|
|
142
131
|
|
|
143
132
|
**CKBox** (https://ckeditor.com/ckbox/)
|
|
144
133
|
|
|
145
|
-
Copyright (c)
|
|
134
|
+
Copyright (c) 2021-2026, [CKSource Holding sp. z o.o.](https://cksource.com/) All rights reserved.
|
|
146
135
|
**CKBox** is licensed under a commercial license and is protected by copyright law. For more details about available licensing options please contact us at [sales@cksource.com](mailto:sales@cksource.com).
|
|
147
136
|
|
|
148
137
|
Trademarks
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c)
|
|
2
|
+
* @license Copyright (c) 2021-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
3
4
|
*/
|
|
4
|
-
const
|
|
5
|
+
const _0x5088cb=_0x4ad8;function _0x3cb7(){const _0x5b980f=['Plural\x20form\x20for\x20language\x20\x22','push','tag','length','strong','584050DsszQD','code','warn','isSupported','useContext','exec','text','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','charAt','1254534JxcQOy','23454yBzkUh','1582350abZPxb','processTags','filter','supportedLocalesOf','Provider','map','createContext','createElement',']:\x20Translation\x20for\x20key\x20\x27','pluralUtils','PluralRules','Fragment','789156UHOXwa','_one','154qrCrNC','keys','4457SbPusu','_rules','slice','indexOf','values','\x22\x20is\x20not\x20supported.','lang','4872KqSMwn','2465034VQafDg','plural','getKey'];_0x3cb7=function(){return _0x5b980f;};return _0x3cb7();}(function(_0x5c498c,_0x23249c){const _0x228594=_0x4ad8,_0x5f28ba=_0x5c498c();while(!![]){try{const _0x52a742=-parseInt(_0x228594(0x1c1))/0x1*(parseInt(_0x228594(0x1bf))/0x2)+-parseInt(_0x228594(0x1da))/0x3+parseInt(_0x228594(0x1bd))/0x4+-parseInt(_0x228594(0x1d1))/0x5+-parseInt(_0x228594(0x1c9))/0x6+-parseInt(_0x228594(0x1dc))/0x7+parseInt(_0x228594(0x1c8))/0x8*(parseInt(_0x228594(0x1db))/0x9);if(_0x52a742===_0x23249c)break;else _0x5f28ba['push'](_0x5f28ba['shift']());}catch(_0x3a2c17){_0x5f28ba['push'](_0x5f28ba['shift']());}}}(_0x3cb7,0x41bdd));import*as _0x11bafc from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x437963){const _0x693263=_0x4ad8;this[_0x693263(0x1c7)]=_0x437963;try{this[_0x693263(0x1c2)]=new Intl['PluralRules'](_0x437963);}catch(_0x1d4c93){console[_0x693263(0x1d3)](_0x693263(0x1d8));}}['getKey'](_0x2d777e,_0x8f85cb){const _0x5ad483=_0x4ad8;if(!this[_0x5ad483(0x1c2)])return _0x2d777e+_0x5ad483(0x1be);const _0x2be114=this[_0x5ad483(0x1c2)]['select'](_0x8f85cb);return _0x2d777e+'_'+_0x2be114;}}Plural[_0x5088cb(0x1d4)]=_0x5e21c0=>{const _0x3d1121=_0x5088cb;try{return Intl[_0x3d1121(0x1bb)][_0x3d1121(0x1df)]([_0x5e21c0])[_0x3d1121(0x1cf)]>0x0;}catch(_0x1c8962){return![];}};const I18nContext=_0x11bafc[_0x5088cb(0x1b7)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x170112,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x2aab78=_0x5088cb;return _0x11bafc['useEffect'](()=>{const _0xa3ba83=_0x4ad8,_0x4f3a06=Plural[_0xa3ba83(0x1d4)](lang);!_0x4f3a06&&console[_0xa3ba83(0x1d3)](_0xa3ba83(0x1cc)+lang+_0xa3ba83(0x1c6));},[lang]),_0x11bafc['createElement'](I18nContext[_0x2aab78(0x1b5)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x170112);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x5088cb(0x1d0),_0x5088cb(0x1d2)],getMsg=(_0x25ac4b,_0x297fef={},_0x255006)=>{const _0x5439ee=_0x5088cb,_0x4dcf4e=_0x255006[_0x5439ee(0x1ca)];if(_0x297fef[_0x25ac4b]&&_0x4dcf4e===undefined)return{'found':!![],'msg':_0x297fef[_0x25ac4b]};const _0x4bf9b8=Object[_0x5439ee(0x1c0)](_0x297fef)[_0x5439ee(0x1de)](_0x525586=>_0x525586[_0x5439ee(0x1c4)](_0x25ac4b)===0x0);if(_0x4bf9b8[_0x5439ee(0x1cf)]===0x0||_0x4dcf4e===undefined)return{'found':![],'msg':_0x25ac4b};const _0x40c058=_0x255006[_0x5439ee(0x1ba)][_0x5439ee(0x1cb)](_0x25ac4b,_0x4dcf4e);return{'found':!![],'msg':_0x297fef[_0x40c058]};},parseMsgTags=_0x27e412=>{const _0x4dc4b8=_0x5088cb,_0x5595fe=[];let _0x49450d=0x0,_0x58f529;while((_0x58f529=TAG_REGEX[_0x4dc4b8(0x1d6)](_0x27e412))!==null){const _0x37fa23=_0x58f529[0x0],{index:_0x57a7de}=_0x58f529,_0x10ed45=_0x37fa23[_0x4dc4b8(0x1d9)](0x1)==='/',_0x2b7e6a=_0x10ed45?_0x37fa23[_0x4dc4b8(0x1c3)](0x2,-0x1):_0x37fa23[_0x4dc4b8(0x1c3)](0x1,-0x1),_0x2819c8=ALLOWED_TAGS['includes'](_0x2b7e6a);if(!_0x2819c8)continue;const _0xe4383f=_0x27e412[_0x4dc4b8(0x1c3)](_0x49450d,_0x57a7de);if(!_0xe4383f){_0x49450d=_0x57a7de+_0x37fa23[_0x4dc4b8(0x1cf)];continue;}_0x10ed45?_0x5595fe[_0x4dc4b8(0x1cd)]({'type':_0x4dc4b8(0x1ce),'name':_0x37fa23['slice'](0x2,-0x1),'content':_0xe4383f}):_0x5595fe[_0x4dc4b8(0x1cd)]({'type':_0x4dc4b8(0x1d7),'content':_0xe4383f}),_0x49450d=_0x57a7de+_0x37fa23['length'];}return _0x49450d<_0x27e412[_0x4dc4b8(0x1cf)]&&_0x5595fe[_0x4dc4b8(0x1cd)]({'type':_0x4dc4b8(0x1d7),'content':_0x27e412[_0x4dc4b8(0x1c3)](_0x49450d)}),_0x5595fe;};function _0x4ad8(_0x5b1c9e,_0x3431c7){_0x5b1c9e=_0x5b1c9e-0x1b5;const _0x3cb779=_0x3cb7();let _0x4ad8cc=_0x3cb779[_0x5b1c9e];return _0x4ad8cc;}function formatMsgWithTags(_0x5734bf){const _0x393465=_0x5088cb,_0x49e2b9=parseMsgTags(_0x5734bf),_0x395de9=_0x49e2b9[_0x393465(0x1b6)](({content:_0x3b38e0,type:_0x368bfa,name:_0x10c35a},_0x3a6957)=>{const _0x28b0a2=_0x393465,_0x4c4c64=_0x368bfa!=='text'&&_0x10c35a?_0x10c35a:_0x11bafc[_0x28b0a2(0x1bc)];return _0x11bafc[_0x28b0a2(0x1b8)](_0x4c4c64,{'key':''+_0x3a6957},_0x3b38e0);});return _0x395de9;}function formatMsg(_0x5cb792,_0x41239f,_0x393da6){const _0x423918=sprintf(_0x5cb792,..._0x41239f!==null&&_0x41239f!==void 0x0?_0x41239f:[]);if(!_0x393da6)return _0x423918;return formatMsgWithTags(_0x423918);}const useTranslation=()=>{const _0x5b4635=_0x5088cb,{lang:_0x1e866e,debug:_0x2a7dd3,pluralUtils:_0x11ba2b,resources:_0xef9ed}=_0x11bafc[_0x5b4635(0x1d5)](I18nContext);function _0x1f44b9(_0x12f0fa,_0x384d4a){const _0xd6734f=_0x5b4635,{found:_0x6d0f23,msg:_0x2d365a}=getMsg(_0x12f0fa,_0xef9ed[_0x1e866e],{'plural':_0x384d4a===null||_0x384d4a===void 0x0?void 0x0:_0x384d4a[_0xd6734f(0x1ca)],'pluralUtils':_0x11ba2b});_0x2a7dd3&&!_0x6d0f23&&console['log']('['+_0x1e866e+_0xd6734f(0x1b9)+_0x12f0fa+'\x27\x20is\x20missing.');if(_0x384d4a===null||_0x384d4a===void 0x0?void 0x0:_0x384d4a[_0xd6734f(0x1dd)])return formatMsg(_0x2d365a,_0x384d4a===null||_0x384d4a===void 0x0?void 0x0:_0x384d4a[_0xd6734f(0x1c5)],!![]);return formatMsg(_0x2d365a,_0x384d4a===null||_0x384d4a===void 0x0?void 0x0:_0x384d4a[_0xd6734f(0x1c5)],![]);}return{'t':_0x1f44b9,'lang':_0x1e866e};};export{I18nContext,I18nProvider,useTranslation};
|