I have a page with several dynamically added RadEditors inside an ajax panel, which is inside a RadSplitter. When ever an Ajax request is complete, I resize the splitter so that the panes are equal height.
The RadEditor loads before the resize, causing the content area to sometimes be squished if the page gets taller. (this is in firefox 3, ie8 seems to work fine.)
Screenshot: squished
If i call the RadEditor method _resizeContentArea from the console of Firebug, it seems to fix the issue. So I added the following javascript:
However, this just made the RadEditor jump to 750px tall, even though it was set at 300px. Any suggestions on how I can fix it?
Thanks!
| function resizeDashboardSplitter() { |
| var contentHeight = $('#cms-content-pane').height(); |
| var treeHeight = $('#cms-site-explorer').height(); |
| var newHeight; |
| newHeight = contentHeight > treeHeight ? contentHeight : treeHeight; |
| dashboardSplitter.set_height(newHeight + 15); |
| } |
| function dashboardSplitterLoaded(splitter, args) { |
| dashboardSplitter = splitter; |
| var prm = Sys.WebForms.PageRequestManager.getInstance(); |
| prm.add_endRequest(resizeDashboardSplitter); |
| resizeDashboardSplitter(); |
| } |
The RadEditor loads before the resize, causing the content area to sometimes be squished if the page gets taller. (this is in firefox 3, ie8 seems to work fine.)
Screenshot: squished
If i call the RadEditor method _resizeContentArea from the console of Firebug, it seems to fix the issue. So I added the following javascript:
| var radEditors = new Array(); |
| function resizeRadEditors() { |
| for (i = 0; i < radEditors.length; i++) { |
| radEditors[i]._updateEditorSize(); |
| radEditors[i]._resizeContentArea(); |
| } |
| } |
| function onEditorLoaded(editor, args) { |
| addEditorStylesheet(editor, args); // not relevant |
| editor.add_modeChange(addEditorStylesheet); // not relevant |
| radEditors.push(editor); |
| } |
However, this just made the RadEditor jump to 750px tall, even though it was set at 300px. Any suggestions on how I can fix it?
Thanks!
