@_sh/strapi-plugin-ckeditor 1.0.8 → 1.0.9

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.
Files changed (59) hide show
  1. package/README.md +168 -8
  2. package/admin/src/components/CKEditor/build/ckeditor.js +2 -2
  3. package/admin/src/components/CKEditor/build/ckeditor.js.map +1 -1
  4. package/admin/src/components/CKEditor/build/translations/ar.js +1 -1
  5. package/admin/src/components/CKEditor/build/translations/az.js +1 -1
  6. package/admin/src/components/CKEditor/build/translations/bs.js +1 -1
  7. package/admin/src/components/CKEditor/build/translations/ca.js +1 -1
  8. package/admin/src/components/CKEditor/build/translations/cs.js +1 -1
  9. package/admin/src/components/CKEditor/build/translations/da.js +1 -1
  10. package/admin/src/components/CKEditor/build/translations/de-ch.js +1 -1
  11. package/admin/src/components/CKEditor/build/translations/de.js +1 -1
  12. package/admin/src/components/CKEditor/build/translations/el.js +1 -1
  13. package/admin/src/components/CKEditor/build/translations/en-au.js +1 -1
  14. package/admin/src/components/CKEditor/build/translations/en-gb.js +1 -1
  15. package/admin/src/components/CKEditor/build/translations/es.js +1 -1
  16. package/admin/src/components/CKEditor/build/translations/et.js +1 -1
  17. package/admin/src/components/CKEditor/build/translations/fa.js +1 -1
  18. package/admin/src/components/CKEditor/build/translations/fi.js +1 -1
  19. package/admin/src/components/CKEditor/build/translations/fr.js +1 -1
  20. package/admin/src/components/CKEditor/build/translations/gl.js +1 -1
  21. package/admin/src/components/CKEditor/build/translations/he.js +1 -1
  22. package/admin/src/components/CKEditor/build/translations/hi.js +1 -1
  23. package/admin/src/components/CKEditor/build/translations/hr.js +1 -1
  24. package/admin/src/components/CKEditor/build/translations/hu.js +1 -1
  25. package/admin/src/components/CKEditor/build/translations/id.js +1 -1
  26. package/admin/src/components/CKEditor/build/translations/it.js +1 -1
  27. package/admin/src/components/CKEditor/build/translations/ja.js +1 -1
  28. package/admin/src/components/CKEditor/build/translations/jv.js +1 -1
  29. package/admin/src/components/CKEditor/build/translations/ko.js +1 -1
  30. package/admin/src/components/CKEditor/build/translations/ku.js +1 -1
  31. package/admin/src/components/CKEditor/build/translations/lt.js +1 -1
  32. package/admin/src/components/CKEditor/build/translations/lv.js +1 -1
  33. package/admin/src/components/CKEditor/build/translations/nb.js +1 -1
  34. package/admin/src/components/CKEditor/build/translations/ne.js +1 -1
  35. package/admin/src/components/CKEditor/build/translations/nl.js +1 -1
  36. package/admin/src/components/CKEditor/build/translations/no.js +1 -1
  37. package/admin/src/components/CKEditor/build/translations/pl.js +1 -1
  38. package/admin/src/components/CKEditor/build/translations/pt-br.js +1 -1
  39. package/admin/src/components/CKEditor/build/translations/pt.js +1 -1
  40. package/admin/src/components/CKEditor/build/translations/ro.js +1 -1
  41. package/admin/src/components/CKEditor/build/translations/ru.js +1 -1
  42. package/admin/src/components/CKEditor/build/translations/sk.js +1 -1
  43. package/admin/src/components/CKEditor/build/translations/sl.js +1 -1
  44. package/admin/src/components/CKEditor/build/translations/sq.js +1 -1
  45. package/admin/src/components/CKEditor/build/translations/sr-latn.js +1 -1
  46. package/admin/src/components/CKEditor/build/translations/sr.js +1 -1
  47. package/admin/src/components/CKEditor/build/translations/sv.js +1 -1
  48. package/admin/src/components/CKEditor/build/translations/th.js +1 -1
  49. package/admin/src/components/CKEditor/build/translations/tk.js +1 -1
  50. package/admin/src/components/CKEditor/build/translations/tr.js +1 -1
  51. package/admin/src/components/CKEditor/build/translations/ug.js +1 -1
  52. package/admin/src/components/CKEditor/build/translations/uk.js +1 -1
  53. package/admin/src/components/CKEditor/build/translations/uz.js +1 -1
  54. package/admin/src/components/CKEditor/build/translations/vi.js +1 -1
  55. package/admin/src/components/CKEditor/build/translations/zh-cn.js +1 -1
  56. package/admin/src/components/CKEditor/build/translations/zh.js +1 -1
  57. package/admin/src/components/CKEditor/index.js +19 -2
  58. package/admin/src/components/CKEditor/styles.js +43 -0
  59. package/package.json +1 -1
package/README.md CHANGED
@@ -18,12 +18,13 @@
18
18
  ## <a id="features"></a>✨ Features
19
19
 
20
20
  * **Lots of default plugins:** for styling text, images, tables and so on.
21
- * **Font color picker:** choose colors for font styling that's not defined in config from the color palette.
21
+ * **Font color picker:** choose color for font styling that's not defined in default palette.
22
22
  * **Upload adapter for Strapi:** for upload images to your library when you drop an image into the editor.
23
23
  * **Fullscreen mode button.**
24
24
  * **Strapi media library button.**
25
25
  * **Supports strapi theme swithing.**
26
26
  * **Supports responsive images:** plugin adds srcset attribute to images based on their `formats` if responsive enable in strapi settings.
27
+ * **Language support:** you can set the preferred language for the UI or the content in the configuration, by default it will use the language defined in the user profile if that language is supported.
27
28
 
28
29
  ## <a id="installation"></a>🔧 Installation
29
30
 
@@ -67,6 +68,90 @@ CKEditor config should be defined in `config.editor` field.
67
68
 
68
69
  Learn more about configuration from [official documentation](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html).
69
70
 
71
+ <details>
72
+ <summary>(spoiler) <b>Built in plugins:</b> </summary>
73
+
74
+ ```js
75
+ plugins: [
76
+ StrapiUploadAdapter,
77
+ Alignment,
78
+ Autoformat,
79
+ AutoImage,
80
+ AutoLink,
81
+ Autosave,
82
+ BlockQuote,
83
+ Bold,
84
+ CloudServices,
85
+ Code,
86
+ CodeBlock,
87
+ DataFilter,
88
+ DataSchema,
89
+ Essentials,
90
+ FindAndReplace,
91
+ FontBackgroundColor,
92
+ FontColor,
93
+ FontFamily,
94
+ FontSize,
95
+ GeneralHtmlSupport,
96
+ Heading,
97
+ HeadingButtonsUI,
98
+ ParagraphButtonUI,
99
+ Highlight,
100
+ HorizontalLine,
101
+ HtmlComment,
102
+ HtmlEmbed,
103
+ Image,
104
+ ImageCaption,
105
+ ImageInsert,
106
+ ImageResize,
107
+ ImageStyle,
108
+ ImageToolbar,
109
+ ImageUpload,
110
+ Indent,
111
+ IndentBlock,
112
+ Italic,
113
+ Link,
114
+ LinkImage,
115
+ List,
116
+ ListProperties,
117
+ MediaEmbed,
118
+ MediaEmbedToolbar,
119
+ Mention,
120
+ PageBreak,
121
+ Paragraph,
122
+ PasteFromOffice,
123
+ RemoveFormat,
124
+ SourceEditing,
125
+ SpecialCharacters,
126
+ SpecialCharactersArrows,
127
+ SpecialCharactersCurrency,
128
+ SpecialCharactersEssentials,
129
+ SpecialCharactersLatin,
130
+ SpecialCharactersMathematical,
131
+ SpecialCharactersText,
132
+ StandardEditingMode,
133
+ Strikethrough,
134
+ Subscript,
135
+ Superscript,
136
+ Table,
137
+ TableCaption,
138
+ TableCellProperties,
139
+ TableProperties,
140
+ TableToolbar,
141
+ TextPartLanguage,
142
+ TextTransformation,
143
+ TodoList,
144
+ Underline,
145
+ WordCount,
146
+ Markdown,
147
+ StrapiMediaLib,
148
+ FullScreen
149
+ ]
150
+
151
+ ```
152
+
153
+ </details>
154
+
70
155
  **Default configuration:**
71
156
  ```js
72
157
  // plugins.js
@@ -79,6 +164,10 @@ module.exports = () => {
79
164
  styles:` // styles applied to editor container `
80
165
  },
81
166
  editor:{ // editor default config
167
+ // https://ckeditor.com/docs/ckeditor5/latest/features/markdown.html
168
+ // if you need markdown support and output set it to removePlugins: [''],
169
+ // default is removePlugins: ['Markdown'],
170
+ // https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html
82
171
  toolbar: {
83
172
  items: [
84
173
  'paragraph',
@@ -126,6 +215,7 @@ module.exports = () => {
126
215
  'redo'
127
216
  ]
128
217
  },
218
+ // https://ckeditor.com/docs/ckeditor5/latest/features/font.html
129
219
  fontSize: {
130
220
  options: [
131
221
  9,
@@ -167,7 +257,9 @@ module.exports = () => {
167
257
  columns: 5,
168
258
  documentColors: 10,
169
259
  },
170
- language: 'en',
260
+ // https://ckeditor.com/docs/ckeditor5/latest/features/ui-language.html
261
+ // default language: 'en',
262
+ // https://ckeditor.com/docs/ckeditor5/latest/features/images/images-overview.html
171
263
  image: {
172
264
  resizeUnit: "%",
173
265
  resizeOptions: [ {
@@ -200,6 +292,7 @@ module.exports = () => {
200
292
  'resizeImage:25', 'resizeImage:50', 'resizeImage:75', 'resizeImage:original'
201
293
  ]
202
294
  },
295
+ // https://ckeditor.com/docs/ckeditor5/latest/features/table.html
203
296
  table: {
204
297
  contentToolbar: [
205
298
  'tableColumn',
@@ -210,6 +303,7 @@ module.exports = () => {
210
303
  'toggleTableCaption'
211
304
  ]
212
305
  },
306
+ // https://ckeditor.com/docs/ckeditor5/latest/features/headings.html
213
307
  heading: {
214
308
  options: [
215
309
  { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
@@ -220,19 +314,85 @@ module.exports = () => {
220
314
  { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' },
221
315
  { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' },
222
316
  {
223
- model: 'h1b',
224
- view: {name: 'h1', classes: 'ck-heading_h1_b'}, title: 'H1 (border)', class: 'ck-heading_heading1', converterPriority: 'high'
317
+ model: 'h1b',
318
+ view: {name: 'h1', classes: 'ck-heading_h1_b'},
319
+ title: 'H1 (border)',
320
+ class: 'ck-heading_heading1',
321
+ converterPriority: 'high'
225
322
  },
226
323
  {
227
- model: 'h2b',
228
- view: {name: 'h2', classes: 'ck-heading_h2_b'}, title: 'H2 (border)', class: 'ck-heading_heading2', converterPriority: 'high'
324
+ model: 'h2b',
325
+ view: {name: 'h2', classes: 'ck-heading_h2_b'},
326
+ title: 'H2 (border)',
327
+ class: 'ck-heading_heading2',
328
+ converterPriority: 'high'
229
329
  },
230
330
  {
231
331
  model: 'h3b',
232
- view: {name: 'h3', classes: 'ck-heading_h3_b'}, title: 'H3 (border)', class: 'ck-heading_heading3', converterPriority: 'high'
332
+ view: {name: 'h3', classes: 'ck-heading_h3_b'},
333
+ title: 'H3 (border)',
334
+ class: 'ck-heading_heading3',
335
+ converterPriority: 'high'
336
+ },
337
+ { model: 'custom',
338
+ view: {name: 'custom', classes: 'Heading 1'},
339
+ title: 'custom',
340
+ class: 'ck-heading_heading3',
341
+ converterPriority: 'high'
233
342
  }
234
343
  ]
235
- }
344
+ },
345
+ // https://ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html
346
+ // if you need more tags
347
+ // htmlSupport: {
348
+ // allow: [
349
+ // // Enables plain <div> elements.
350
+ // {
351
+ // name: 'div'
352
+ // },
353
+
354
+ // // Enables plain <div>, <section> and <article> elements.
355
+ // {
356
+ // name: /^(div|section|article)$/
357
+ // },
358
+
359
+ // // Enables <div>s with all inline styles (but no other attributes).
360
+ // {
361
+ // name: 'div',
362
+ // styles: true
363
+ // },
364
+
365
+ // // Enables <div>s with foo and bar classes.
366
+ // {
367
+ // name: 'div',
368
+ // classes: [ 'foo', 'bar' ]
369
+ // },
370
+
371
+ // // Adds support for `foo` and `bar` classes to the already supported
372
+ // // <p> elements (those are enabled by the dedicated paragraph feature).
373
+ // {
374
+ // name: 'p',
375
+ // classes: [ 'foo', 'bar' ]
376
+ // },
377
+
378
+ // // Enables <div>s with foo="true" attribute and bar attribute that
379
+ // // can accept any value (boolean `true` value works as an asterisk).
380
+ // {
381
+ // name: 'div',
382
+ // attributes: {
383
+ // foo: 'true',
384
+ // bar: true
385
+ // }
386
+ // },
387
+
388
+ // // Adds support for style="color: *" to the already supported
389
+ // // <p> and <h2-h4> elements.
390
+ // {
391
+ // name: `/^(p|h[2-4])$/'`,
392
+ // styles: { 'color': true }
393
+ // },
394
+ // ]
395
+ // },
236
396
  }
237
397
  }
238
398
  }