Hello,
I have a WebHtmlEditor control on a page and it is set to 680px. If i add <img> tags in Html view that references a large image (ie: wider than 680px), the control expands to fit the image when viewed back in design view.
Since my application is fixed width, this is causing my application to distort.
Is there a setting to prevent this and to ensure scroll bars are displayed?
Thanks
Hi Warwick,
I tested WebHtmlEditor with default Width (where 660px is used automatically) and with 680px.
<ighedit:WebHtmlEditor ID="WebHtmlEditor1" runat="server" UploadedFilesDirectory="~/Images/" ImageDirectory="Images/htmleditor/"></ighedit:WebHtmlEditor>
I tried to insert IMG from html-view by<img src="http://localhost:35275/Site111/Images/big.bmp" ><img style="width: 1000px; height: 1000px;" src="http://localhost:35275/Site111/Images/big.bmp">I also tried to use InsertImage button at design-view, and some other combinations.
In all cases and in all browsers (IE7/8/9, Firefox, Safari, Chrome) WebHtmlEditor did not change its size and the scrollbars appeared in editing area of WebHtmlEditor.However, under IE, if that image is clicked by mouse in Design-view, then browser creates "editing rectangle" (small rectangles at corners) around image and bounds of that rectangle goes outside of bounds of WebHtmlEditor. That action does not affect visible bounds of WebHtmlEditor and bounds of page (scrollbars do not appear in browser). The only side-effect: mouse becomes "locked" inside of that large editing-rectangle. But WebHtmlEditor has no control over that functionality of browser and it is not able to modify or prevent that large editing-rectangle.
Sorry for not updating this forum post at the same time as updating the support ticket, but i failed to mention in the orginal post a vital step.
This only seems to be a problem when our existing records are reloaded. To mimic this, please add the following code to the back-end aspx.cs file (may need to modify the url slightly):
WebHtmlEditor1.Text = "<img src='http://localhost:49772/upload/Koala.jpg' />";
When the page is loaded now, the control is expanded to fit the screen.
Hi,
Thanks for replying. Just to confirm though that I am experiencing this in IE8, not IE9.
Also, there is no submit in the process. I am loading an existing record stored in the database and as such using the Text property of the control in the back-end aspx.cs page.
Regards
That is correct, failure to keep specific width of container when a child stretched to 100%-width has its own nested-content-child with large size happens in both IE8 and IE9. That feature of IE8/9 has effect only when html is initially rendered (a postback is same thing). When large content is set dynamically by javascript after initial rendering (large image is inserted on client), then that problem does not happen.
That issue was fixed by using calculated "px" value for width of editing-area (DIV). It used to be that only width of outer container was set to a specific width defined by application and widths of all other child elements were set to 100%.
Could you please confirm the position with this issue for both IE8 and IE9? Are either fixed in a service release as previously suggested?
That issue has been fixed and will be available in service releases. I can not tell exact date. I think in a month or so.
Hello Warwick,
This service release is now available for download.
Please let me know if this helps solve your issue or if you need further assistance with it.