Feature #8142
closedauto preview on the right side of content text area
0%
Description
Hi,
I implement this Javascript (http://www.redmine.org/issues/244) in the edit.rhtml, so now I see the preview of the page on the right side.
The text area is limited to 25 rows. If I enter more than 25 rows the text are becomes a scrollbar. But the preview is getting larger and making larger/longer the page. How can I resize the text area, where I am typing the conten?
In the trac system it is solved with this:<script type="text/javascript">
jQuery(document).ready(function($) {
$("#text").blur(function() {
$("#scroll_bar_pos").val(this.scrollTop);
}).get(0).scrollTop = $("#scroll_bar_pos").val();
$("#editrows").change(function() {
resizeTextArea("text", this.options[this.selectedIndex].value);
});
function autoResizeText() {
var preview_height = $("#preview").height();
if (preview_height)
$("#text").height(preview_height);
}
autoResizeText();
$(window).resize(autoResizeText);
$("#text").autoPreview("/trac/ecom/wiki_render", {
realm: "wiki", id: "Drucker"
}, function(textarea, text, rendered) {
$("#preview div.wikipage").html(rendered);
autoResizeText();
});
});
</script>
Are there possibilities to make the same with ruby? I am not a good programmer.
Best regards,
Vige