As part of the Geeklog Opensource Portal/CMS we allow the story editor to resize the FCKeditor when then click on a + or - image link - onclick="changeTextAreaSize('introtext','larger');
This has worked fine for the past couple years but is not working since I upgraded to the latest 2.6.3 version.
The function below does resize the outer frame of the editor but the FCKeditor instance is not resizing. I have the autogrow plugin disabled.
Can anyone shed some light on this?
This has worked fine for the past couple years but is not working since I upgraded to the latest 2.6.3 version.
The function below does resize the outer frame of the editor but the FCKeditor instance is not resizing. I have the autogrow plugin disabled.
Can anyone shed some light on this?
function changeHTMLTextAreaSize(element, option) { var size = 0; var size = document.getElementById(element + '___Frame').height; alert(element + '___Frame size:' + size); if (option == 'larger') { document.getElementById(element + '___Frame').height = +(size) + 50; document.getElementById(element + '___Frame').style.height = +(size) + 50; } else if (option == 'smaller') { document.getElementById(element + '___Frame').height = +(size) - 50; document.getElementById(element + '___Frame').style.height = +(size) - 50; } }
Re: Resize Editor frame via JS used to work before upgrade to 2.
Re: Resize Editor frame via JS used to work before upgrade to 2.
That small detail should make the magic.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Resize Editor frame via JS used to work before upgrade to 2.
Getting some success with your suggestion. Interestingly, it will expand the editor on the first attempt and reduce it but in each direction only once. I changed the increment to 10px and got the same results - increase or reduce but only +/- either way of intial size once.
I have the same result in IE7 and FF3 with no errors as seen with firebug.
It's as if I need to update an internal value.
Re: Resize Editor frame via JS used to work before upgrade to 2.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Resize Editor frame via JS used to work before upgrade to 2.
I found that once I used __Frame.style.height to get the current size, then it returned a value like '200px' so then I just needed to convert that to real integer value.
Here is the final working code:
Thanks!