I am using CKEditor in order to create Rich Text Fields which are stored in the database of my back-end. My problem is: when I add images to these fields via CKEditor, width and height attributes are set with CSS in a style tag, like this:
<img
alt=""
src="https://something.cloudfront.net/something.jpg"
style="height:402px; width:716px"
/>
And when I try to display the Rich Text Field containing the above code in angular like this:
<p class="card-text" [innerHTML]="blogEntry.content"></p>
Angular produces the following code without including the inline CSS which contains the height and width properties:
<img alt="" src="https://something.cloudfront.net/something.jpg">
This results in image being shown in original size regardless of height and width properties set using the CKEditor.
I don't want height and width properties to be discarded. What would be the ideal solution to this problem? I will be glad if you can help. Thanks.