From f6191711203dcef656dcdb19554308c57a7dadda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Mar 2021 13:45:38 +0100 Subject: [PATCH] set minimum size in ckeditor --- .../Resources/public/modules/ckeditor5/index.js | 7 ++++--- .../Resources/public/modules/ckeditor5/index.scss | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.scss diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.js b/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.js index 4e91411b5..f0b7885b4 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.js @@ -16,6 +16,7 @@ import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading'; import LinkPlugin from '@ckeditor/ckeditor5-link/src/link'; import ListPlugin from '@ckeditor/ckeditor5-list/src/list'; import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph'; +import "./index.scss"; export default class ClassicEditor extends ClassicEditorBase {} @@ -68,8 +69,8 @@ ClassicEditor.defaultConfig = { let Fields = []; -Fields.push.apply(Fields, document.querySelectorAll('textarea.ckeditor')); -Fields.push.apply(Fields, document.querySelectorAll('.cf-fields textarea')); +Fields.push.apply(Fields, document.querySelectorAll('textarea[ckeditor]')); +//Fields.push.apply(Fields, document.querySelectorAll('.cf-fields textarea')); Fields.forEach(function(field) { ClassicEditor @@ -81,4 +82,4 @@ Fields.forEach(function(field) { console.error( error.stack ); }) ; -}) \ No newline at end of file +}); \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.scss b/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.scss new file mode 100644 index 000000000..3e5259af4 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/modules/ckeditor5/index.scss @@ -0,0 +1,4 @@ +// set min height for ckeditor +.ck-editor__editable { + min-height: 150px; +} \ No newline at end of file