-
- 3,250 Posts
Oops, forgot to ask, how do we do it currently? I have searched the source and the FCKeditor help stuff but can’t find it.
-
- 1,732 Posts
Hmmm,
I’ll have to check with FCK
-
- 1,732 Posts
Quote from: Mark at Oct 14, 2005, 12:50 AM
Raymond?
Hi Mark,
This is truely long overdue
Here’s the updated code:
global $replace_richtexteditor;
$replace_richtexteditor[] = "introtext";
$html = '<script>'.
'document.mutate.introtext.style.height="100px";'.
'setTimeout("adJustIntrotextSize()",800);'.
'function adJustIntrotextSize(){'.
' var o = document.getElementById("introtext___Frame");'.
' if(o) {o.style.height="130px";o.style.width="300px"}'.
' if(o) {'.
' var oEditor = FCKeditorAPI.GetInstance("introtext");'.
' if(oEditor) oEditor.ToolbarSet.Collapse();'.
' }'.
'}'.
'</script>';
$modx->event->output($html);
-
- 3,250 Posts
Raymond, the collapse toolbar bit doesn’t seem to work at all.
-
- 1,732 Posts
Hmmm,
Try increasing the time from 800 to the following:
setTimeout("adJustIntrotextSize()",1200);
-
- 1,732 Posts
You’re correct Mark but we can’t use that feature as the Plugin is already making use of that function.
Here’s a quick work around
global $replace_richtexteditor;
$replace_richtexteditor[] = "introtext";
$html = '<script>'.
'var tick=0;'.
'document.mutate.introtext.style.height="100px";'.
'setTimeout("adJustIntrotextSize()",800);'.
'function adJustIntrotextSize(){'.
' if(!self.FCKeditorAPI) {tick++;setTimeout("adJustIntrotextSize()",800);return;}'.
' else if(tick>5) return;'.
' var o = document.getElementById("introtext___Frame");'.
' if(o) {o.style.height="130px";o.style.width="300px"}'.
' if(o) {'.
' var oEditor = FCKeditorAPI.GetInstance("introtext");'.
' if(oEditor) oEditor.ToolbarSet.Collapse();'.
' }'.
'}'.
'</script>';
$modx->event->output($html);