Compare commits

...

3 commits

Author SHA1 Message Date
John Linhart
44260f75b5
Merge pull request #15600 from aarohiprasad/sent-emails-formatting
Some checks failed
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-simple-text (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-skyline (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-sparse (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-sunday (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-survey (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-trulypersonal (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-vibrant (push) Has been cancelled
Split up the monorepo into subrepositories for composer purposes / Sync commits into mautic/theme-welcome (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.2 mariadb:10.11 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.3 mariadb:10.11 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.4 mariadb:10.11 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.2 mariadb:11.4 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.3 mariadb:11.4 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.4 mariadb:11.4 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.2 mysql:8.4 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.3 mysql:8.4 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.4 mysql:8.4 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.2 mysql:9.2 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.3 mysql:9.2 (push) Has been cancelled
Mautic tests and validations / PHPUnit 8.4 mysql:9.2 (push) Has been cancelled
Mautic tests and validations / e2e-tests (push) Has been cancelled
Mautic tests and validations / CS Fixer - 8.2 (push) Has been cancelled
Mautic tests and validations / PHPSTAN - 8.2 (push) Has been cancelled
Mautic tests and validations / PHPStan baseline changes - 8.2 (push) Has been cancelled
Mautic tests and validations / Rector tests - 8.2 (push) Has been cancelled
Mautic tests and validations / Rector - 8.2 (push) Has been cancelled
Mautic tests and validations / Twig Lint - 8.2 (push) Has been cancelled
Mautic tests and validations / composer install - 8.2 (push) Has been cancelled
Mautic tests and validations / composer lock check - 8.2 (push) Has been cancelled
Mautic tests and validations / scaffolded files mismatch - 8.2 (push) Has been cancelled
Sent email formatting fixes
2025-11-05 17:31:52 +01:00
John Linhart
8faefd6393 Updates for CK editof v5 2025-11-05 16:14:26 +00:00
Saurabh Gupta
01f7a564b0 Merge pull request #1724 from acquia/MAUT-7359
MAUT-7359 : COX auto experiencing formatting issues with sent emails
2025-11-05 16:14:20 +00:00
3 changed files with 17 additions and 4 deletions

View file

@ -261,10 +261,10 @@ Mautic.ConvertFieldToCkeditor = function(textarea, ckEditorToolbarOptions) {
ckEditors.delete( textarea[0] )
}
const tokenCallback = textarea.attr('data-token-callback');
Mautic.InitCkEditor(textarea, Mautic.GetCkEditorConfigOptions(ckEditorToolbarOptions, tokenCallback));
Mautic.InitCkEditor(textarea, Mautic.GetCkEditorConfigOptions(ckEditorToolbarOptions, tokenCallback, textarea));
}

Mautic.GetCkEditorConfigOptions = function(ckEditorToolbarOptions, tokenCallback) {
Mautic.GetCkEditorConfigOptions = function(ckEditorToolbarOptions, tokenCallback, textarea = null) {
const defaultOptions = ['undo', 'redo', '|', 'bold', 'italic', 'underline', 'heading', 'fontfamily', 'fontsize', 'fontColor', 'fontBackgroundColor', 'alignment', 'numberedList', 'bulletedList', 'blockQuote', 'removeFormat', 'link', 'ckfinder', 'mediaEmbed', 'insertTable', 'sourceEditing'];
const ckEditorToolbar = typeof ckEditorToolbarOptions != "undefined" && ckEditorToolbarOptions.length > 0 ? ckEditorToolbarOptions : defaultOptions;
const ckEditorColors = [
@ -284,6 +284,7 @@ Mautic.GetCkEditorConfigOptions = function(ckEditorToolbarOptions, tokenCallbac
{ color: '#4c4ce6', label: 'Blue' },
{ color: '#994ce6', label: 'Purple' }
];
const allowFullHtml = textarea && typeof textarea.attr('allow-full-html') !== 'undefined';
const ckEditorOption = {
toolbar: {
items: ckEditorToolbar,
@ -328,7 +329,18 @@ Mautic.GetCkEditorConfigOptions = function(ckEditorToolbarOptions, tokenCallbac
allowedProtocols: [ 'https?', 'tel', 'sms', 'sftp', 'smb', 'slack' ]
},
htmlSupport: {
allow: [
fullPage: {
allowRenderStylesFromHead: allowFullHtml
},
allow: allowFullHtml ? [
{
// Allow all HTML elements
name: /.*/,
attributes: true,
classes: true,
styles: true
}
] : [
{
name: /^(a|span)$/,
attributes: true,

View file

@ -63,7 +63,7 @@ class SubmitActionEmailType extends AbstractType
[
'label' => 'mautic.form.action.sendemail.message',
'label_attr' => ['class' => 'control-label'],
'attr' => ['class' => 'form-control editor editor-basic'],
'attr' => ['class' => 'form-control editor editor-basic', 'allow-full-html' => true],
'required' => false,
'data' => $message,
]

View file

@ -109,6 +109,7 @@ class EmailType extends AbstractType
'class' => 'form-control editor editor-basic-fullpage editor-builder-tokens editor-email',
'data-token-callback' => 'email:getBuilderTokens',
'data-token-activator' => '{',
'allow-full-html' => true,
],
]
);