mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°7552 - CKEditor: Include CKE styles in the backoffice theme and emails style
This commit is contained in:
@@ -628,7 +628,7 @@ class ActionEmail extends ActionNotification
|
||||
*/
|
||||
protected function _DoExecute($oTrigger, $aContextArgs, &$oLog)
|
||||
{
|
||||
$sStyles = file_get_contents(APPROOT.'css/email.css');
|
||||
$sStyles = file_get_contents(APPROOT . utils::GetCSSFromSASS("css/email.scss"));
|
||||
$sStyles .= MetaModel::GetConfig()->Get('email_css');
|
||||
|
||||
$oEmail = new EMail();
|
||||
@@ -867,7 +867,13 @@ class ActionEmail extends ActionNotification
|
||||
*/
|
||||
protected function BuildMessageBody(bool $bHighlightPlaceholders = false): string
|
||||
{
|
||||
$sBody = $this->Get('body');
|
||||
// Wrap content with a specific class in order to apply styles of HTML fields through the emogrifier (see `css/email.scss`)
|
||||
$sBody = <<<HTML
|
||||
<div class="email-is-html-content">
|
||||
{$this->Get('body')}
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
/** @var ormDocument $oHtmlTemplate */
|
||||
$oHtmlTemplate = $this->Get('html_template');
|
||||
if ($oHtmlTemplate && !$oHtmlTemplate->IsEmpty()) {
|
||||
|
||||
@@ -103,7 +103,8 @@ $ibo-figure--spacing-y: 2em !default;
|
||||
* See https://bulma.io/documentation/elements/content/
|
||||
*/
|
||||
.ibo-is-html-content {
|
||||
@extend .content;
|
||||
@extend .content; /* Bulma styles */
|
||||
@extend .ck-content; /* CKEditor styles */
|
||||
|
||||
/* For table to render like in CKEditor, works with bulma lib. overload see:
|
||||
* - ../../vendors/_bulma-variables-overload.scss)
|
||||
|
||||
2
css/backoffice/vendors/_all.scss
vendored
2
css/backoffice/vendors/_all.scss
vendored
@@ -8,7 +8,7 @@
|
||||
@import "../../../node_modules/bulma-scss/utilities/all";
|
||||
@import "../../../node_modules/bulma-scss/base/all";
|
||||
@import "../../../node_modules/bulma-scss/elements/content";
|
||||
@import "ckeditor";
|
||||
@import "ckeditor/all";
|
||||
@import "c3";
|
||||
@import "tippy";
|
||||
@import "jqueryui";
|
||||
|
||||
7
css/backoffice/vendors/ckeditor/_all.scss
vendored
Normal file
7
css/backoffice/vendors/ckeditor/_all.scss
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
@import "../../../../js/ckeditor/build/compiled-theme"; /* CKEditor content styles (tables, lists, ...) */
|
||||
@import "overloads"; /* Overloads of CKEditor styles for the backoffice */
|
||||
File diff suppressed because one or more lines are too long
18
css/email.scss
Normal file
18
css/email.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
/* Note: only CSS1 is supported here (see the limitations of emogrifier: https://github.com/jjriv/emogrifier/) */
|
||||
.caselog_header {
|
||||
padding: 3px;
|
||||
border-top: 1px solid #fff;
|
||||
background-color: #ddd;
|
||||
padding-left: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
.caselog_header_date {
|
||||
}
|
||||
.caselog_header_user {
|
||||
}
|
||||
|
||||
/* N°7611 - Ensure to embed HTML fields styles */
|
||||
@import "../js/ckeditor/build/compiled-theme";
|
||||
.email-is-html-content {
|
||||
@extend .ck-content;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user