Image in paragraph does not display in Internet Explorer
The logo image does not display in the Internet Explorer browser after a refresh.
Prior to the refresh, the image specification code is as below:
<IMG src=" \\<image location>" width="7.75in" height="0.99in" />
After the refresh, the image code is as below:
<img height="0" src=" \\<image location>" width="7" />
Steps to Reproduce
- Pass an HTML as a string using Property-Set-HTML by referring to HTML stream.
- Populate the string in the Rich Text Editor (RTE) control.
- Execute the usecase in the Internet Explorer browser.
- Perform a section refresh. The height and width attributes are rounded-off
A third-party product issue: Similar behavior in the CKEditor Demo site.
There is difference in the behavior of the innerHTML attribute assignment in the Internet Explorer and the Chrome browsers.
Execute the below code in the browser Console (both in Internet Explorer and the Chrome)
var test = document.createElement('div')
test.innerHTML = "<img width=\"3in\" height=\"2in\" alt=\"\" src=\"../datacontent/Image/rteImages/TestImage.jpg\">"
Check the Test element in the Console, Internet Explorer rounds off the width and height values.
Perform the following local-change:
Use the style attribute instead of the height and width attributes as below:
<img alt="" src="<Image location>" style="width: 2.8in; height: 0.8in;" />
Published September 6, 2019 - Updated October 8, 2020
Was this useful?
0% found this useful
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.