-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Froala editor: useClassess to false #5174
Conversation
The froala CSS files are not loaded into the production versions of the landing page/emails and so they can't be used. This was done on purpose to prevent froala from interfering with the them with it's own CSS. |
This is a clean way to prevent froala from stripping inline css and applying classes a) are from a stylesheet we don't allow froala to generate b) are useless in email anyway |
This PR still hacks the Froala library. This option does not work? |
@escopecz Is this a new addition? If this is currently implemented then no, it doesn't work. |
@GaberNeighbor please try update. Don't forget call php app/console mautic:assets:generate |
Woohoo, this looks much better! |
Works properly. Problem from #5620 is working as well. |
So this solution works for the use case @kuzmany outlined. It does not solve @GaberNeighbor's use case. It would if we'd put However, all of this was already there once, but it was removed because it did not work for another use case. I'm not quite sure what to do now. |
@escopecz But this option was removed before Code Mode. I |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved the issue for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright then 👍
I noticed this PR generate a lot of inline styles.
This is real issue. I didn't find any option to disable it. But we should focus on it and include solution to 2.15 :( Test with forms and description area field. I tested with enable/disable useClasses |
@kuzmany what's the problem? Is it just longer HTML? |
@escopecz Yes, it's bad. Style form by theme has to be with |
So the emails/pages now looks differently? Are you able to send before and after screenshot? I mean it should look the same as in the builder, right? |
Description:
Just set useClassess option to false.
For this option to work correctly, it is necessary to load the CSS files from the same domain the editor is running on.
https://www.froala.com/wysiwyg-editor/docs/options#useClasses
Another option is uncommented these lines
mautic/app/bundles/CoreBundle/Assets/css/libraries/libraries.less
Line 31 in d3aebf3
mautic/app/bundles/CoreBundle/Assets/css/libraries/builder.less
Line 5 in d3aebf3
I didn't know why it was commented. Should somebody from core team should know
Steps to reproduce the bug:
Steps to test this PR:
app/console m:a:g
List deprecations along with the new alternative:
List backwards compatibility breaks: