I think “limitation” is the fairer description. I’ll look into how to flag it up.
@Tut can put this into the bugs category so as to mark for @lubos attention. It’s not a bug, but does need to be looked at. If HTML coding works properly in a browser, but not in Manager, there there is an issue.
Thanks
It isn’t a bug, so it won’t go into that category. As I said earlier in this thread, fields don’t support all HTML syntax. So this topic has turned into beating a dead horse.
The issue is somewhat more complex, because Manager itself currently supports more syntax options than the PDF generator. This is, however, a known issue and is being worked on. There are plans to provide a definitive list of what is supported. No date has been promised, though.
Manager will throw away all attributes except for style
, href
and colspan
. The reason is that internal PDF generator understands only these three.
I can see how for sending emails this is not desirable. So this is something I will need to fix. For the time being, just make sure each table
tag has style
attribute with width: 100%
value and it will work.
See my example below:
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
<tr>
<td align="center" valign="top">
<table style="border-width:1px;border-color:#cccccc;border-style:solid;width:100%" cellpadding="0" cellspacing="0" id="emailContainer">
<tr>
<td align="center" valign="top">
<table style="width:100%" border="0" cellpadding="0" cellspacing="0" width="100%" id="emailHeader">
<tr>
<td valign="top" style="width:100%;height:3.25em;background:#3498db;padding-left:20px;padding-top:.5em">
<a style="font-size:2em;font-family:Georgia,Times New Roman,Times,serif;text-decoration:none;color:#ffffff" href="https://www.littlehotels.co.uk">Little Hotels</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="20" cellspacing="0" width="100%" id="emailBody">
<tr>
<td valign="top" align="left" style="font-size:.9em;font-family:Georgia,Times New Roman,Times,serif;color:#666666">
<p>Adjunto enviamos una factura para comisiones correspondientes a la estancia de unos clientes nuestros. La enviamos en el formato PDF. En caso que no pueda abrirla, baje Acrobat Reader <a href="https://get.adobe.com/uk/reader/">aquí</a>.</p>
<p>Gracias y saludos<br>
<img src="//cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex019/uploads/manager1/original/2X/0/0fd3edfcc4c7845e30cb3b6c21cab65a62a0cf39.jpg" width="184" height="45"><br>
Little Hotels<br>
<a href="https://www.littlehotels.co.uk">www.littlehotels.co.uk</a><br>
<a href="mailto:office@littlehotels.co.uk">office@littlehotels.co.uk</a><br>
Tel: 0117-230-3500</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width:100%;border-width:1px;border-color:#ff0000;border-style:solid">
<table border="0" cellpadding="10" cellspacing="0" id="emailFooter" style="width:100%;border-width:1px;border-color:#0000ff;border-style:solid;overflow:scroll">
<tr>
<td style="font-size:.9em;font-family:Georgia,Times New Roman,Times,serif;color:#aaaaaa;text-align:center">© 2004-2018 Little Hotels Ltd (Registered in England. Reg No 4772543)<br>
Tel 0117 230 3500
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
I am setting up emails within Manager and I now see why you are having problems. It is really hard.
I have managed to work out how to get my text to show in correct colour, correct font size, but I can’t work out the following:
I don’t want to use
for every line of text because this puts a space between each line as its a paragraph obviously. However, this was the only way that I could get my text to show. I am obviously not putting the style= in the correct way when putting the below in one paragraph.
The size attribute has no effect - not sure if I am doing it wrong
The font attribute has no effect - not sure if I am doing it wrong.
Here is a sample of what I am trying to do:
<p style="color:#282f6b; size:5; font-size:14pt; font:Georgia">name</p>
<p style="color:#97bfe7; size:4; font-size:14pt; font:Georgia""> IT Consultant and Technician </p>
Any ideas? Thank you.
Ps. @lubos - A preview window of what the email would look like would be brilliant when trying to set this up. I must have sent around 50 emails getting this far lol.
Disregard my above post. I worked out that I needed to use span, font-family and bold to get the text right. Everything is working as required.
I ended up following my own earlier suggestion and used notepad ++ to preview the changes, so having a preview in Email Templates is not necessary as it really is better to do this in notepad ++ and just post the final code into Manager.
@lubos You were right. I had already done some tidying up of the code (in some unknown way some of the double quotes had turned themselves into left or right quotes) but I had missed one of the errors. The difference in the quotes was invisible on my screen and I only found it by putting the whole lot through a W3C validator.
I’m still stuck with an inability to centre the main table on the page, but I’m just having to live with that. Unfortunately HTML in emails is still stuck in the dark ages and I’m not sure how anyone will ever find a way out of that.
Ya coding for emails is really crappy. You cannot use html 5 and CSS coding unfortunately. Tables should never be used for aligning content etc, divs are much better, but I don’t think that divs centering works well in email html as its really an html 5 functionality.
What I can suggest is putting a topic request with your coding on Spiceworks. Brilliant website if you want help with any IT issue including html coding. I have used Spiceworks a fair bit.