@_sh/strapi-plugin-ckeditor 3.0.3 → 3.0.4
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
CHANGED
|
@@ -76,7 +76,9 @@ yarn build
|
|
|
76
76
|
## <a id="configuration"></a>⚙️ Configuration
|
|
77
77
|
___
|
|
78
78
|
|
|
79
|
-
It is highly recommended to explore [**the official CKEditor5 documentation**](https://ckeditor.com/docs/ckeditor5/latest/features/index.html) and [**the Strapi Custom Field API**](https://docs.strapi.io/developer-docs/latest/development/custom-fields.html#registering-a-custom-field-on-the-server)
|
|
79
|
+
> It is highly recommended to explore [**the official CKEditor5 documentation**](https://ckeditor.com/docs/ckeditor5/latest/features/index.html) and [**the Strapi Custom Field API**](https://docs.strapi.io/developer-docs/latest/development/custom-fields.html#registering-a-custom-field-on-the-server)
|
|
80
|
+
>
|
|
81
|
+
> To display content from external sources, such as images or videos, in your admin panel, you need to configure your `middlewares.js` file. [**Check the official documentation for details.**](https://docs.strapi.io/dev-docs/configurations/middlewares#security)
|
|
80
82
|
|
|
81
83
|
The plugin configuration should be defined in `your-app/config/ckeditor.js|ts`
|
|
82
84
|
|
|
@@ -298,11 +300,11 @@ const CKEConfig = () => ({
|
|
|
298
300
|
|
|
299
301
|
</details>
|
|
300
302
|
|
|
301
|
-
> 📂 Default preset: [**admin/src/Input/presets/default.js**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/Input/presets/default.js)
|
|
302
303
|
|
|
303
|
-
> 📂 Default
|
|
304
|
+
> 📂 Default preset: [**admin/src/Input/presets/default.js**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/3.x.x/admin/src/Input/presets/default.js)
|
|
305
|
+
>
|
|
306
|
+
> 📂 Default theme: [**admin/src/Input/theme**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/3.x.x/admin/src/Input/theme)
|
|
304
307
|
|
|
305
|
-
> 💡 To display content from an external source in your admin panel, you should configure your `middlewares.js`. [**Explore the documentation for more information**](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html)
|
|
306
308
|
|
|
307
309
|
## Adding plugins
|
|
308
310
|
|
|
@@ -601,7 +603,7 @@ yarn develop
|
|
|
601
603
|
|
|
602
604
|
### From v2 to v3
|
|
603
605
|
|
|
604
|
-
- The default editor configurations (toolbar, toolbarBalloon, blockBalloon) have been removed and now there is only one preset by default. You will need to update your fields in the Content-Type Builder
|
|
606
|
+
- The default editor configurations (toolbar, toolbarBalloon, blockBalloon) have been removed and now there is only one preset by default. You will need to update your fields in the Content-Type Builder.
|
|
605
607
|
|
|
606
608
|
- Config file extension has changed from `.txt` to `.js` or `.ts`
|
|
607
609
|
- Configuration object properties have been renamed:
|
|
@@ -698,10 +700,18 @@ const CKEConfig = () => ({
|
|
|
698
700
|
|
|
699
701
|
</details>
|
|
700
702
|
|
|
703
|
+
### From v1 to v2
|
|
704
|
+
|
|
705
|
+
- You will need to update Strapi to version v4.4.x for plugin v2.0.x, or to v4.13.0+ for v2.1.x.
|
|
706
|
+
|
|
707
|
+
- Starting with v2, the plugin uses the Custom Field API, so you'll need to manually update your schema.
|
|
708
|
+
|
|
709
|
+
- The plugin configuration should be defined in /config/ckeditor.txt from v2 onward. [Please refer to the v2 configuration guide for details.](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/e782475f54b8a50a04f55275c89ef5bf61a15745/README.md?plain=1#L54)
|
|
710
|
+
|
|
701
711
|
|
|
702
712
|
|
|
703
713
|
## <a id="requirements"></a>⚠️ Requirements
|
|
704
714
|
___
|
|
705
|
-
Strapi
|
|
715
|
+
Strapi **>= 4.13.0 < 5.0.0**
|
|
706
716
|
|
|
707
717
|
Node **>=18.0.0 <=20.x.x**
|
|
@@ -15,17 +15,17 @@ export const MediaLib = ({ isOpen = false, onToggle = () => {}, editor }) => {
|
|
|
15
15
|
let set = '';
|
|
16
16
|
let keys = Object.keys(formats).sort((a, b) => formats[a].width - formats[b].width);
|
|
17
17
|
keys.map((k) => (set += prefixFileUrlWithBackendUrl(formats[k].url) +` ${formats[k].width}w,`));
|
|
18
|
-
newValue = `<img src="${
|
|
18
|
+
newValue = `<img src="${url}" alt="${alt}" width="${width}" height="${height}" srcset="${set}" />`;
|
|
19
19
|
} else {
|
|
20
|
-
newValue = `<img src="${
|
|
20
|
+
newValue = `<img src="${url}" alt="${alt}" width="${width}" height="${height}" />`;
|
|
21
21
|
}
|
|
22
22
|
} else if (mime.includes('video')) {
|
|
23
23
|
newValue = `
|
|
24
24
|
<video class="video" controls width="500px">
|
|
25
|
-
<source src="${
|
|
25
|
+
<source src="${url}" type="${mime}" />
|
|
26
26
|
</video>`;
|
|
27
27
|
} else {
|
|
28
|
-
newValue = `<a href="${
|
|
28
|
+
newValue = `<a href="${url}">${name || 'Open document'}</a>`;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -64,6 +64,5 @@ export const MediaLib = ({ isOpen = false, onToggle = () => {}, editor }) => {
|
|
|
64
64
|
|
|
65
65
|
MediaLib.propTypes = {
|
|
66
66
|
isOpen: PropTypes.bool,
|
|
67
|
-
onChange: PropTypes.func,
|
|
68
67
|
onToggle: PropTypes.func,
|
|
69
68
|
};
|
|
@@ -283,15 +283,6 @@ const defaultEditorConfig = {
|
|
|
283
283
|
},
|
|
284
284
|
link: {
|
|
285
285
|
decorators: {
|
|
286
|
-
openInNewTab: {
|
|
287
|
-
mode: 'manual',
|
|
288
|
-
label: 'Open in a new tab',
|
|
289
|
-
defaultValue: true,
|
|
290
|
-
attributes: {
|
|
291
|
-
target: '_blank',
|
|
292
|
-
rel: 'noopener noreferrer',
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
286
|
toggleDownloadable: {
|
|
296
287
|
mode: 'manual',
|
|
297
288
|
label: 'Downloadable',
|
package/package.json
CHANGED