I created an editor with a certain height/width. Now I want to change the height/width it without creating a new editor (performance, causes the inner data to be lost, loses connection to items that point on it etc). How do I do that?
Thu, 12/03/2009 - 10:42
#1
Re: How do I change the width of an EXISTING editor
var height = parseInt(document.getElementById('<text_area_name>___Frame').style.height);
if(which == 'smaller') {
height -= 50;
}
else {
height += 50;
}
document.getElementById('<text_area>___Frame').style.height = height + 'px';
}
I use this to reset the height on a button click; for width change height to width. <text_area> is the name you give to the text area and that is a triple underscore:___Frame.
Re: How do I change the width of an EXISTING editor
I saw that fckeditor is creating an inner document with its own body and head. Should I refer to the inner document? if so how?
Re: How do I change the width of an EXISTING editor
<text_area> is just a place holder. You have to insert the name of your own text area followed by three underscores and the word Frame.
I use the textarea method, for a Javascript implementation. But if you use the equivalent of this:
<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/fckeditor/";
oFCKeditor.Create();
</script>
Then I would guess that the name would be FCKeditor1___Frame.