Jump to content
X2Community Forums

Campaign email rich editor deletes code of Doc templates


Recommended Posts

Something I have seen for years with X2 that doesn't make sense!

I go to a lot of trouble designing my responsive emails in Docs module as templates. I don't use any complex HTML and keep it super simple. I mainly do text based campaigns but need some basic styling with tabled, colors etc.

When I then use these templates in a Campaign, the campaign rich text editor then deletes most of the code and ends up sending this vanilla email that doesn't look at all like what I designed.

Why is this? Why is the rich text editor in Docs somehow different from the editor in Campaign?

Super frustrating. 

Link to post
Share on other sites

Hi eugenb,
This is most likely due to style (width, height, font-size, etc...)  you use in your HTML. Some of our validators check style on html when you save and says what style elements are allowed to be set and which are not. I can't name the files that do this off the top of my head but we will look into changing this in a future release.
-Jack

Link to post
Share on other sites

Thanks Jack.

My concern is more why is it different from the Docs module to the editor used in the Campaign. Its actually been doing this since I used X2. I always have to open my HTML email in the campaign editor to make sure it works. Then I go back and scale down the styling and code in the Docs module. In the campaign editor you cant really have anything other than the most simplistic HTML. I always thought its to make the email more readable over the various browsers.

Should it not be the same? Its really horrible because one takes time developing your emails. then run the campaign and it changes the email going out completely.

 

If its a quick fix please let me know. Happy to update any of my code 😉

Link to post
Share on other sites

Hi Eugeneb,
I don't have any specifics but removing  "$model->content = Fields::getPurifier()->purify($model->content);" from the marking controller should work. You can also mess with the function "public static function getPurifier(){" in the file protected/models/Fields.php to allow the html that is being striped. I have not tested either of these solutions but it should be the right direction.
-Jack

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...