From 3e02eed7a047d13c1751354688461cf17ff136fb Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 10 Nov 2008 09:52:18 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4834 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/editor/skins/default/editor.html | 2 +- modules/editor/tpl/js/editor.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/editor/skins/default/editor.html b/modules/editor/skins/default/editor.html index b0df7276d..bc3a1e0b3 100644 --- a/modules/editor/skins/default/editor.html +++ b/modules/editor/skins/default/editor.html @@ -177,7 +177,7 @@
- +
diff --git a/modules/editor/tpl/js/editor.js b/modules/editor/tpl/js/editor.js index 66ba56ca2..30b81467d 100755 --- a/modules/editor/tpl/js/editor.js +++ b/modules/editor/tpl/js/editor.js @@ -413,6 +413,7 @@ function editorChangeMode(mode, editor_sequence) { } else if (editorMode[editor_sequence]=='preview') { // html = xInnerHtml(preview_obj); html = textarea_obj.value; +// xAddEventListener(xGetElementById('editor_preview_'+editor_sequence), 'load', function(){setPreviewHeight(editor_sequence)}); } else { html = contentDocument.body.innerHTML; textarea_obj.value = html @@ -446,7 +447,7 @@ function editorChangeMode(mode, editor_sequence) { fo_obj.id = "preview_form"; fo_obj.action = request_uri; fo_obj.target = "editor_preview_"+editor_sequence; - xInnerHtml(fo_obj,''); + xInnerHtml(fo_obj,''); document.body.appendChild(fo_obj); } fo_obj.content.value = html; @@ -521,4 +522,8 @@ function showPreviewContent(ret_obj,response_tags, params, fo_obj) { xGetElementById('fileUploader_'+params.editor_sequence).style.display='none'; // alert(ret_obj.content); xInnerHtml(preview_obj, ret_obj.content); -} \ No newline at end of file +} + +function setPreviewHeight(editor_sequence){ + xHeight('editor_preview_'+editor_sequence,xGetElementById('editor_preview_'+editor_sequence).contentWindow.document.body.scrollHeight+20); +}