How to align images in the text area element

If you wish to to align images in the default text area in messageML, you must use the div style:

<messageML>

<div style="text-align:right">

<img src="https://symphony.com/assets/brand/thumb_symphony_shards.jpg"/>

</div>

</messageML>

Figure 1 Code

Note: The position of the image is determined by the text-align: attribute value of the div element and not by the img element.

The code above will display the image as shown in Figure 2:

mceclip0.png

Figure 2 Right aligned image

Trying to align an image using the align attribute in a message/create call will result in an error message stating Failed to parse MessageML: Attribute \"align\" is not allowed in \"img\". This is because only styling the variable via the style attribute is allowed.

Refer to the Knowledge Article found here for further information on the text area element.