tobas1996 β created an issue.
Yes, we can change the 'Basic site settings' but, maybe we don't want to send the newsletter simplenews emails with that email.
It should be the email from newsletter, not from the "Basic site settings".
Hope it helps you!
Hi! I create a MR where I contribute with this functionality and form configuration.
It needs work, and documentation.
I'm using the exactly same form as https://www.drupal.org/project/ckeditor5_font β , as a color picker. It works like a charm with form implementation, and also js/css.
I implemented new configuration plugin where the form inputs are set and saved. Also, on a submit I added a new process where we create dynamically a css file where we store our custom variable colors. We keep the old file, because its useful if we don't want to configure any color.
If we configure our colours, we will limit the editor on that colors, and it will work automatically with new colors because of this process that I mentioned.
Also I change the "elements" allowed, because it should be dynamically so I used : - <$any-html5-element class> and I added a function inside the plugin where we set the allowed tags based on colors selected (if you configure some color).
Hope it helps, I think its good workaround.
Thanks in advance.
Hi!
Just to contribute some help if someone needs. I modified the default behavior in a custom module, following the #2 comment.
function my_module_ckeditor5_plugin_info_alter(array &$plugin_definitions): void {
assert($plugin_definitions['ckeditor5_highlight_highlight'] instanceof CKEditor5PluginDefinition);
$plugin_definition = $plugin_definitions['ckeditor5_highlight_highlight']
->toArray();
$plugin_definition['ckeditor5']['config']['highlight']['options'][] = [
'model' => 'redPen',
'class' => 'pen-red',
'title' => t('Red pen'),
'color' => 'var(--ck-highlight-pen-red)',
'type' => 'pen'
];
$plugin_definitions[$value] = new CKEditor5PluginDefinition($plugin_definition);
}
This code customize the toolbar highlight, only render 1 "pen red" option and "erase" option. You can add your own CSS in order to override the color 'var(--ck-highlight-pen-red)' or override the class pen-red. Also you can add another buttons or options, following the given structure on documentation:https://ckeditor.com/docs/ckeditor5/latest/features/highlight.html
Ok,
Now its working without hardcoding the format. I overrided the function preRenderText, in order to pass the $format_id to our process() function inside the filter.
Its working fine, BUT when we go to edit page again, the "Limit allowed HTML tags and correct faulty HTML" removes the style/class attributes, so we lose the color.
It means, that works only when you add color, and save. When you come back to the edit, you don't have the style/class attribute, so we are losing that content :( .
I don't know why its happening, I think its because the filter it's only acting on render, and we need to do it on 'save' maybe. This is not problem that comes with my code, it was already happened.
I think that we can't improve our solution for now, so... for now its working "fine", but only the first time. Then you can set again the text you want, and save it, and will be saved and working. It means that is working perfect if you disable "Limit allowed HTML tags and correct faulty HTML" and the style attribute are converted into class.
On another hand
I saw this on ckeditor5 documentation: https://ckeditor.com/docs/ckeditor5/latest/features/font.html
FontColor β Control the font color by applying inline elements with a color in the style attribute. , so the problem would come from ckeditor. Look this active issues on ckeditor5 --> https://github.com/ckeditor/ckeditor5/issues/6557 -- https://github.com/ckeditor/ckeditor5/issues/15794
They suggest to use https://ckeditor.com/docs/ckeditor5/latest/features/highlight.html
Maybe should go for use that instead of fontColor plugin.
Waiting some answer on this appreciations.
Thanks in advance
I pushed new version that allows span tag with "class" attribute and, also now works with configured colors, not just HSL default colors.
The hardcoded format_id 'basic_html' remains unsolved, we need to find a solution.
Also I suggest to create a css located (for example) at sites/default/files/ckeditor5_font/format_id /colors.css dynamically based on configuration format editors. At the moment, we need to create our 'css' file and style our class 'ckeditor5-font-color-$label'. The $label is the label configured on ckeditor5_font colors available
It works if combine this patches:
"no config schema' Error after update to Drupal 10.1.0": "
https://www.drupal.org/files/issues/2024-01-25/ckeditor5_font-schema-fix β
...",
"TypeError: array_filter(): Argument #1 ($array) must be of type array": "
https://www.drupal.org/files/issues/2023-04-21/3350333-5.patch β
",
"Add option to use classes instead of style attributes": "https://git.drupalcode.org/project/ckeditor5_font/-/merge_requests/5.diff"
Hope it helps.
Hi! I can confirm that its not working when I enable ""Limit allowed HTML tags and correct incorrect HTML".
Steps to reproduce:
1. Installing by composer.
2. Add patches:
"no config schema' Error after update to Drupal 10.1.0": "
https://www.drupal.org/files/issues/2024-01-25/ckeditor5_font-schema-fix... β
",
"TypeError: array_filter(): Argument #1 ($array) must be of type array": "
https://www.drupal.org/files/issues/2023-04-21/3350333-5.patch β
",
"Add option to use classes instead of style attributes": "https://git.drupalcode.org/project/ckeditor5_font/-/merge_requests/5.diff"
3. Enable the module.
4. Configure color; I think, that is required to configure color because if not, the code doesn't execute when we need it, only when comparing with the custom configured colors.
5. Select the new filter and put it higher the "Limit allowed HTML tags and correct incorrect HTML" filter.
6. The filter removes the style and cannot change style per class, because style is not existing anymore.
Thank you!
tobas1996 β created an issue.
Hi!
I'm facing the same issue here with drupal 10.2.2.
When i open "Content language and translation" /admin/config/regional/content-language , when I select some of the "Entity type" checkboxes, it shows the entities down. BUT, when I save its not saving, and also I cannot see the fields
So i uncheck and check again the "collection type" checkbox but previous selections are lost.
Thank you.
Im trying to attach that "diff": https://git.drupalcode.org/project/drupal/-/merge_requests/4619.diff on a Drupal 10.1.6 version, and It does not work. Could you review it please?
Grateful for your work. Thanks
tobas1996 β made their first commit to this issueβs fork.
Hi!
I am modifying that function MailEntity::getHeaders() , adding this :
+ $headers['Sender'] = $this->getFromAddress();
+ $headers['Return-Path'] = $this->getFromAddress();
Maybe you mean that its redundant to pass again to $message['from'] at MailBuilder::buildNewsletterMail().
If we do not modify this (at least the MailEntity:getHeaders()), the sender is always the configuration system site email.
Hope it helps
tobas1996 β created an issue.
tobas1996 β created an issue.
Hi!
I'm using this patch on version Drupal core 10.1.2 and Layout Builder Modal 8.x-1.2.
My modal needs 2 clicks to be openned and I receive the next error on the first click:
ajax.js?v=10.1.2:1119 An error occurred during the execution of the Ajax response: The following files could not be loaded: /corporativo/modules/contrib/layout_builder_modal/theme/claro/css/table.css?s0icd922
I noticed that is missspelled and is missing an 's' after 'table.css'. It should be 'tables.css'.
I'm attaching the new patch. Is exactly the same, with this error fixed.
Thanks!
tobas1996 β created an issue.
tobas1996 β made their first commit to this issueβs fork.
tobas1996 β made their first commit to this issueβs fork.
tobas1996 β created an issue. See original summary β .
#17 I created the MR, now you can put just the .diff :
https://git.drupalcode.org/project/drupal/-/merge_requests/4528.diff
Thanks!
tobas1996 β created an issue.
Hi! I've just created this issue, but I solved some things. Please review the MR and let me know something :).
Thank you!
tobas1996 β created an issue.
Hi again!
I've just request a new merge request to this issue fork.
Please review it and if everything ok, it could be merged :).
Thank you!
Hi!
I detected that the user should insert "@" before to text the user name.
So I suggest to add "@" to the beggining. I'm attaching this patch, hope it helps!
tobas1996 β made their first commit to this issueβs fork.
I don't know why, but it also happens to me. Would be nice to find out a solution.
Thank you