I have spent the last 2 days tracking down this problem and finally figured out what it happening. It was a pain in the ass to find exactly what was going on.
When using the common marketing automation softwares out there (I have used them all), they allow you to create custom landing pages, just like Mautic does. More often than not, the landing pages are created outside the software and the HTML is pasted directly into the marketing automation software. No other software modifies the HTML, ever.
Mautic is changing the HTML that gets pasted in through the “Source” button – CKEditor modifies the HTML. I spent so much time trying to figure out what was going on because this was the last thing I would have expected.
If you have an empty class, like you would do in Font Awesome,
Code:
The editor strips the code out completely. There is a lot of talk on StackOverflow and various forums. Under no circumstances should you be modifying HTML code we paste in!!
I see this has been brought up before:
https://github.com/mautic/mautic/pull/847
This is a nightmare to diagnose.
I have tried modifying the CKEditor config.js file - https://github.com/mautic/mautic/blob/staging/app/bundles/CoreBundle/Assets/js/libraries/ckeditor/config.js
How can I make it so that CKEditor NEVER changes HTML posted in, whether it be while creating an email or a landing page? If this can't be done, what other solutions will allow me to just paste in HTML in a simple text box without anything that is going to mess with my carefully crafted HTML?
I have spent the last 2 days tracking down this problem and finally figured out what it happening. It was a pain in the ass to find exactly what was going on.
When using the common marketing automation softwares out there (I have used them all), they allow you to create custom landing pages, just like Mautic does. More often than not, the landing pages are created outside the software and the HTML is pasted directly into the marketing automation software. No other software modifies the HTML, ever.
Mautic is changing the HTML that gets pasted in through the “Source” button – CKEditor modifies the HTML. I spent so much time trying to figure out what was going on because this was the last thing I would have expected.
If you have an empty class, like you would do in Font Awesome,
<i class="fa fa-play-circle"></i>
The editor strips the code out completely. There is a lot of talk on StackOverflow and various forums. Under no circumstances should you be modifying HTML code we paste in!!
How can I make it so that CKEditor NEVER changes HTML posted in, whether it be while creating an email or a landing page? If this can’t be done, what other solutions will allow me to just paste in HTML in a simple text box without anything that is going to mess with my carefully crafted HTML?
BTW - on the CKEditor config file, I added this line to no avail:
config.allowedContent = true;
The editor isn’t doing us any favors by modifying the HTML code we paste in. There shouldn’t be malicious things happening here. With how difficult it is to craft standards compliant landing pages that render pixel perfect on all devices, the HTML should not be modified.