If i create an editor widget and set its value to an img tag with a style attribute, the style attribute gets removed when I view the html for the editor (using the "viewHtml" command tool):
<div id="homeBanner" contenteditable="true" style="height: 160px; overflow: hidden; border: 1px dashed red; padding: 0">
<img src="~/Content/TemplateImages/homeBanner1.png" style="width: 100%" />
</div>
var bannerEditor = $("#homeBanner").data("kendoEditor");
bannerEditor.value("<img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />");
Expected edited value: <img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />
Actual Result: <img alt="" src="/ImageBrowser/Image?path=homeBanner.png" width="100" />
style tag is missing and width is missing the '%'.
This does not happen on all tags e.g. <p> does not get modified.
Is there a way to prevent this behavior? I want to set any image added to be 100% width.
Thank you!
<div id="homeBanner" contenteditable="true" style="height: 160px; overflow: hidden; border: 1px dashed red; padding: 0">
<img src="~/Content/TemplateImages/homeBanner1.png" style="width: 100%" />
</div>
var bannerEditor = $("#homeBanner").data("kendoEditor");
bannerEditor.value("<img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />");
Expected edited value: <img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />
Actual Result: <img alt="" src="/ImageBrowser/Image?path=homeBanner.png" width="100" />
style tag is missing and width is missing the '%'.
This does not happen on all tags e.g. <p> does not get modified.
Is there a way to prevent this behavior? I want to set any image added to be 100% width.
Thank you!