diff --git a/application/utils.inc.php b/application/utils.inc.php index eb41f22ff..f881ef0be 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -2640,6 +2640,7 @@ class utils 'contentsLanguage' => $sLanguage, 'extraPlugins' => 'disabler,codesnippet,mentions,objectshortcut,font,uploadimage', 'uploadUrl' => utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php', + 'contentsCss' => array(utils::GetAbsoluteUrlAppRoot().'js/ckeditor/contents.css', utils::GetAbsoluteUrlAppRoot().'css/ckeditor/contents.css'), ); // Mentions diff --git a/css/backoffice/components/_field.scss b/css/backoffice/components/_field.scss index 80295dee9..5ab50ab99 100644 --- a/css/backoffice/components/_field.scss +++ b/css/backoffice/components/_field.scss @@ -189,6 +189,8 @@ $ibo-field--enable-bulk--checkbox--margin-left: 8px !default; /* Hack to force a table to fit its container without overflow (see N°2127) */ /* Note that along with with, we now display a "expand" icon on large fields so we can have a better view of its content */ .HTML { + @extend .ibo-vendors-ckeditor--display-content; + table { table-layout: fixed; width: 100%; diff --git a/css/backoffice/layout/activity-panel/_caselog-entry.scss b/css/backoffice/layout/activity-panel/_caselog-entry.scss index f61d4113b..3dbc3d5af 100644 --- a/css/backoffice/layout/activity-panel/_caselog-entry.scss +++ b/css/backoffice/layout/activity-panel/_caselog-entry.scss @@ -17,6 +17,9 @@ $ibo-caselog-entry--main-information--decoration--width: 3px !default; .ibo-activity-entry--main-information-icon{ display: none; } + .ibo-activity-entry--main-information-content{ + @extend .ibo-vendors-ckeditor--display-content; + } /* Highlight color */ .ibo-activity-entry--main-information::before{ diff --git a/css/backoffice/vendors/_ckeditor.scss b/css/backoffice/vendors/_ckeditor.scss index 6f7c0abc6..c9fdc45e7 100644 --- a/css/backoffice/vendors/_ckeditor.scss +++ b/css/backoffice/vendors/_ckeditor.scss @@ -85,4 +85,19 @@ ul.cke_autocomplete_panel{ color: $ibo-vendors-ckeditor--autocomplete-item-title--text-color; @extend %ibo-font-weight-700; } +} + +/* These rules should be the same as those in css/ckeditor/contents.css */ +.ibo-vendors-ckeditor--display-content{ + .cke_editable{ + line-height: 1.4; + } + figure{ + border: solid 1px #ccc; + border-radius: 2px; + } + p{ + margin-top: 0.25em; + margin-bottom: 0.25em; + } } \ No newline at end of file diff --git a/css/ckeditor/contents.css b/css/ckeditor/contents.css new file mode 100644 index 000000000..983760f3d --- /dev/null +++ b/css/ckeditor/contents.css @@ -0,0 +1,20 @@ +/* + * @copyright Copyright (C) 2010-2021 Combodo SARL + * @license http://opensource.org/licenses/AGPL-3.0 + */ + +/* These rules should be the same as those in css/backoffice/vendors/ckeditor.css */ +body{ + margin: 5px 10px; +} +.cke_editable{ + line-height: 1.4; +} +figure{ + border: solid 1px #ccc; + border-radius: 2px; + } +p{ + margin-top: 0.25em; + margin-bottom: 0.25em; +} \ No newline at end of file