Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/dist/ckeditor5-craftcms.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/dist/ckeditor5-craftcms.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/web/assets/ckeditor/src/ckeditor5-craftcms.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {Alignment} from '@ckeditor/ckeditor5-alignment';
import {
AutoImage,
Image,
ImageResize,
ImageCaption,
ImageStyle,
ImageToolbar,
Expand Down Expand Up @@ -87,6 +88,7 @@ const allPlugins = [
HtmlComment,
HtmlEmbed,
Image,
ImageResize,
ImageCaption,
ImageStyle,
ImageToolbar,
Expand Down Expand Up @@ -565,6 +567,12 @@ export const create = async function (element, config) {
// for more info
removePlugins.push('MediaEmbedToolbar');

// remove ImageResize build-in plugin, if it's not explicitly allowed in config
// see: https://github.com/craftcms/ckeditor/issues/328
if (!config.enableImageResize) {
removePlugins.push('ImageResize');
}

if (removePlugins.length) {
plugins = plugins.filter((p) => !removePlugins.includes(p.pluginName));
}
Expand Down