Skip to content

Commit

Permalink
Changed the integration method to CDN.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgsy committed Aug 28, 2024
1 parent ea0d729 commit 66b7a08
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
18 changes: 11 additions & 7 deletions admin/src/components/CKEditorInput/Configurator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// import "@reinmar/ckeditor5-maximum-length/build/maximum-length.js";
import { StrapiMediaLib } from "./plugins/StrapiMediaLib";

import "../../vendor/ckeditor5-maximum-length/index.umd";
import "../../vendor/ckeditor5-maximum-length/index-editor.css";

const {
Alignment,
Autoformat,
Expand Down Expand Up @@ -51,6 +53,8 @@ const {
Highlight
} = window.CKEDITOR;

const { MaximumLength } = window.MaximumLength;

const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
light: {
plugins: [
Expand Down Expand Up @@ -374,13 +378,13 @@ export default class Configurator {
config.plugins.push( Markdown );
}

// if ( maxLength ) {
// config.plugins.push( MaximumLength );
if ( maxLength ) {
config.plugins.push( MaximumLength );

// config.maximumLength = {
// characters: maxLength
// };
// }
config.maximumLength = {
characters: maxLength
};
}

return config;
}
Expand Down
1 change: 1 addition & 0 deletions admin/src/vendor/ckeditor5-maximum-length/index-editor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ck.ck-editor__editable .ck-maximum-length-excess{background-color:rgba(204,51,51,.3)}
12 changes: 12 additions & 0 deletions admin/src/vendor/ckeditor5-maximum-length/index.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions admin/src/vendor/ckeditor5-maximum-length/index.umd.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66b7a08

Please sign in to comment.