1

While using ajax HtmlEditorExtender i am experiencing a wierd problem. i.e. The width attribute is gone and the image shrinks.
Initially my textbox which is associated with HtmlEditorExtender has this text

txtMessage.Text = "<span style=\" padding:10px 0px 10px 0px; width:100%; \"><img src=\"../images/img4layout2.png\" width=\"675px\" height=\"300px\" ></span><span style=\"font-weight: normal;\">Some text here.</span>";

and the image looks like this. enter image description here

When i click any dropdown on page or any other control the source of HtmlEditorExtender changes mysteriously to this (There is no width attribute now)

  <span style=" padding:10px 0px 10px 0px; width:100%; "><img src="../images/img4layout2.png" height="300px"></span><span style="font-weight: normal;">Some text here.</span>

and Finally the image looks like this. enter image description here

i am not using any javascript on this page.

4

1 に答える 1

0

設計上、AjaxControlToolkit は、HtmlEditorExtender のコンテンツに追加された html 要素の width、class、および id 属性を削除します。ツールキットのソース コードをダウンロードし、いくつかのマイナーな変更を加えて、これが起こらないようにすることができます。

HTMLEditorExtender removes “class”, “id” attributesに対するYuriy Rozhovetskiyの回答をご覧ください。

于 2013-05-20T18:02:07.143 に答える