I've just installed 2.6.2 in our dev enviroment, and the Javascript code I am using (found it in this forum) no longer works. Has the API been changed some how?
Note: Since this is a OnCompleate event, I'm checking to see if this is the instance I want to enlarge.
I have used FireBug to confirm that the code is running and should be working. But it isn't, any ideas?
Code follows.
//AutoResizes the Editor to use available vertical space.
function FCKeditor_OnComplete( editorInstance )
{
//alert("FCK Editor instance name is " + editorInstance.Name);
if (editorInstance.Name == "ctl00_cpMain_fckPageEditor")
{
var BrowserHeight = "";
if (window.innerWidth) //if browser supports window.innerWidth
BrowserHeight = window.innerHeight;
else if (document.all) //else if browser supports document.all (IE 4+)
BrowserHeight = document.body.clientHeight;
if (BrowserHeight != "" && BrowserHeight != null)
{
if (BrowserHeight > 130)
BrowserHeight = BrowserHeight - 130;
editorInstance.EditorWindow.parent.window.frameElement.height = BrowserHeight;
}
}
}
Note: Since this is a OnCompleate event, I'm checking to see if this is the instance I want to enlarge.
I have used FireBug to confirm that the code is running and should be working. But it isn't, any ideas?
Code follows.
//AutoResizes the Editor to use available vertical space.
function FCKeditor_OnComplete( editorInstance )
{
//alert("FCK Editor instance name is " + editorInstance.Name);
if (editorInstance.Name == "ctl00_cpMain_fckPageEditor")
{
var BrowserHeight = "";
if (window.innerWidth) //if browser supports window.innerWidth
BrowserHeight = window.innerHeight;
else if (document.all) //else if browser supports document.all (IE 4+)
BrowserHeight = document.body.clientHeight;
if (BrowserHeight != "" && BrowserHeight != null)
{
if (BrowserHeight > 130)
BrowserHeight = BrowserHeight - 130;
editorInstance.EditorWindow.parent.window.frameElement.height = BrowserHeight;
}
}
}
Re: Javascript resize code not working in FCK 2.6.2
* BUMP *
Hello, anyone out there? Not time for vacation yet!
Has anyone else encountered this or is it just me?
Is there some other resize code I can try?
Pleas help.
Thanx!
Re: Javascript resize code not working in FCK 2.6.2
>> You code, get height >>>>
var BrowserHeight = "";
if (window.innerWidth) //if browser supports window.innerWidth
BrowserHeight = window.innerHeight;
else if (document.all) //else if browser supports document.all (IE 4+)
BrowserHeight = document.body.clientHeight;
if (BrowserHeight != "" && BrowserHeight != null)
{
if (BrowserHeight > 130)
BrowserHeight = BrowserHeight - 130;
}
>> and set the height >>>>
var fck= document.getElementById("FCKeditor1___Frame");
fck.style.height= (BrowserHeight)+'px';
## A better way if there was some method but I can't find it.
mvh
Uve
Re: Javascript resize code not working in FCK 2.6.2
Thanks again!