This took a while haha, but I think I figured it out for you.
Firstly the code you've placed is missing a '<' somewhere, but I've fixed it up a bit.
I changed it up so that there is a Div and the style is set for that. I did this in Postman and one issue I ran into is that it didn't like me using " I had to use ' instead.
<html><body><div style='margin-top:30px; text-align:center; display:block;'><a href='https://google.com#39;>Record your Screen</a></div></body></html>
I sent this in the body and this is the result I got:
I am curious as well on what the limits of HTML can be sent through, but hopefully this is the formatting you were looking for
@Azure Radio 277 might be worth making some clarifying documentation around HTML usage and it's limitations.
For further context I tested this using Postman, and here's my full code in the body:
{
"message_type":"note",
"type":"admin",
"admin_id":"XXXXXXX(ommittedactualadminIDforobviousreasonslol)",
"body":"<html><body><div style='margin-top:30px; text-align:center; display:block;'><a href='https://google.com#39;>Record your Screen</a></div></body></html>"
}
Hope that helps!
Oh sorry I forgot to include all the code besides just the style of the link:
<html><body> <h4>Share screen recordings</h4><br><img src='https://oetonline.net.au/pluginfile.php/43232/mod_resource/content/1/YoutubeIcon.png#39; alt='no image'><div style='margin-top:30px; text-align:center; display:block;'><a href='https://google.com#39;>Record your Screen</a></div></body></html>
Using just a random video image with this code it looks like this.
Hopefully that replicates exactly what you're aiming for, though probably with a smaller image size haha.
Hi Zak,
Thanks for reply. this does not work for me. even if you mention width and height for image, it's not working. You can inspect and see if styles are applied or not. Try color attribute for link. So i think @Azure Radio 277 should guide to appropriate documentaion or approach on this.
Hey Shivprasad,
Could you clarify in what way it's not working? Are you able to replicate it at least the way I was able to based on the screenshot provided?
I tested this by sending an API call, so if you're not seeing it work like in my screenshot we may need to have a look at your code, but if you're trying to do something else I can take another look.