All--
I'm having some challenges with the image alignment in my application's CKEditor instance for creating HTML emails. While
Is there a documented method to convert CKEditor from
For those struggling with this same issue, be aware that newer versions of Outlook also disregard image sizing via style declaration as well. It's not just you!
Thank you in advance for any help you can provide.
I'm having some challenges with the image alignment in my application's CKEditor instance for creating HTML emails. While
style="float:left"is a certainly a valid manner of justifying an image, it appears that Microsoft, in its infinite wisdom has made that invalid for recent versions of Outlook's HTML Rendering engine. As a result, users of my application are getting great looking results for everyone but their most up-to-date and potentially lucrative customers--not a good situation!
Is there a documented method to convert CKEditor from
style="float:left"images to
align="left"? If it makes any difference, I'm instantiating CK via Jquery.
For those struggling with this same issue, be aware that newer versions of Outlook also disregard image sizing via style declaration as well. It's not just you!
Thank you in advance for any help you can provide.
Re: Change Float to Align for HTML Emails
yeah, outlook 2007 is crap.
Re: Change Float to Align for HTML Emails
Alfonso, any chance that you could point me toward a fix?
Re: Change Float to Align for HTML Emails
I'd like a solution for this as well. I had to deal with this very issue just this morning.
For the short term, I've reverted back from 3.5 to 3.4.2, which doesn't force the use of "float" style over the "align" attribute.
I'd think that the solution would be a modification of the code in the output_html sample page that does the trick for width/height values. I managed to mod that stuff to pick out the border-width value and set it as an attribute as well. See this forum post for that bit: viewtopic.php?f=11&t=17207&start=10
Trick is, I'm not having luck modding these code bits to extract other values, other than the "(value)px" values that the width/height bits look for. If anyone has the regex-fu to get this to work, by all means!
Re: Change Float to Align for HTML Emails
Thanks.
Re: Change Float to Align for HTML Emails
And then take the next bit of code and call it *after* the editor load:
If all set up properly, it should fire whenever an <img> tag is added or modified, sniff out the various variables in the "style" attribute, and add them as old-school standalone attributes.
Most of the first block of code, I snagged from one of the samples and then made some additions, to catch borders and float. I'd still like to get 'border-style' in the mix, I haven't puzzled out the regex needed to sniff that one out yet, but it's low-priority as most folks don't use borders on images anyhow.