Hi,
how can I work with 2 fckeditors in one site?
When I load 2 fckeditor's in one site, only the last loaded fckeditor can be used.
please help
how can I work with 2 fckeditors in one site?
When I load 2 fckeditor's in one site, only the last loaded fckeditor can be used.
please help
RE: view fckeditor twice in one site
RE: view fckeditor twice in one site
Here you are:
http://sourceforge.net/tracker/index.ph ... tid=543655
RE: view fckeditor twice in one site
The solution you point out doesnt work for me. I copied the new function in the js file, but it doent make a difference. Is there anything else I need to do?.
RE: view fckeditor twice in one site
Second, you've pasted the function but you still need to execute it. My guessing is that you just need have several editors open at once and all visible. If this is so, i think you just need to execute the function in file fck_last. Find function:
CompleteLoading(){
/*some code here*/
FCK.ForceDesignMode();// last line should look like that
}
Not 100% sure if it works but sure enough to give you advice;) Remember about making editor load files from _source tree.
jacek
RE: view fckeditor twice in one site
Is there any workaround?
RE: view fckeditor twice in one site
But all this hints described here did not help.
Now what to do?
Thanks
RE: view fckeditor twice in one site
Try this... multiple fckeditors
If the timeouts aren't far enough apart you run into the same problem... weird huh? Try it and let me know how it goes.
Code example below:
function editor1(){
var oFCKeditor = new FCKeditor( 'completedMessage','100%','300px' ) ;
oFCKeditor.BasePath = '<c:url value="/FCKeditor/"/>' ;
oFCKeditor.ReplaceTextarea() ;
}
function editor2(){
var oFCKeditor2 = new FCKeditor( 'templateHTML','100%','700px' ) ;
oFCKeditor2.BasePath = '<c:url value="/FCKeditor/"/>' ;
oFCKeditor2.Config['FullPage'] = true ;
oFCKeditor2.ReplaceTextarea() ;
}
function editor3(){
var oFCKeditor3 = new FCKeditor( 'htmlAutoResponse','100%','500px' ) ;
oFCKeditor3.BasePath = '<c:url value="/FCKeditor/"/>' ;
oFCKeditor3.Config['FullPage'] = true ;
oFCKeditor3.ReplaceTextarea() ;
}
function initEditor()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
//var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
setTimeout("editor1();",2000);
setTimeout("editor2();",4000);
setTimeout("editor3();",6000);
}
RE: Try this... multiple fckeditors
RE: Try this... multiple fckeditors
Delay = Number of Instances * 300
E.g.:
2 Instances:
setTimeout("load1", 0)
setTimeout("load2",600)
4 Instances
setTimeout("load1()",0);
setTimeout("load2()",1200);
setTimeout("load3()",2400);
setTimeout("load4()",3600);
The code (php within javascript ):
window.onload = function()
{
<?php For ($c=0;$c<$NumberOfInstances;$c++) { $delay = ($c) * ($NumberOfInstances * 300); Echo "setTimeout(\"load". $c. "()\", $delay); "; } ?>
}
RE: Try this... multiple fckeditors
I am tring to run multiple editors on one page... but for the life of me.. I cant get FF or mozilla get to work .
I saw your post.. but i dont understand it... How do i use this?
Thanks much .. I would be very greatful if you were as detailed as possible.. Thanks much ..
Terry
___________________________
I ran into the same problem with firefox. I found that by setting staggered timeouts - it fixed the problem for me.
If the timeouts aren't far enough apart you run into the same problem... weird huh? Try it and let me know how it goes.
Code example below:
function editor1(){
var oFCKeditor = new FCKeditor( 'completedMessage','100%','300px' ) ;
oFCKeditor.BasePath = '<c:url value="/FCKeditor/"/>' ;
oFCKeditor.ReplaceTextarea() ;
}
function editor2(){
var oFCKeditor2 = new FCKeditor( 'templateHTML','100%','700px' ) ;
oFCKeditor2.BasePath = '<c:url value="/FCKeditor/"/>' ;
oFCKeditor2.Config['FullPage'] = true ;
oFCKeditor2.ReplaceTextarea() ;
}
function editor3(){
var oFCKeditor3 = new FCKeditor( 'htmlAutoResponse','100%','500px' ) ;
oFCKeditor3.BasePath = '<c:url value="/FCKeditor/"/>' ;
oFCKeditor3.Config['FullPage'] = true ;
oFCKeditor3.ReplaceTextarea() ;
}
function initEditor()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
//var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
setTimeout("editor1();",2000);
setTimeout("editor2();",4000);
setTimeout("editor3();",6000);
}
RE: view fckeditor twice in one site
I am having the same problem in FireFox but John Mark's solution doesn't make sense to me because I am not loading the editor the same way.

I am using vbscript on ASP and load it inline like this:.
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/" ) )
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
with oFCKeditor
.BasePath = sBasePath
.Config("SkinPath") = sBasePath + "editor/skins/silver/"
.ToolbarSet = "Default"
.Width = 600
.Height = 300
.Value = vShortdescription
.Create "shortdescription"
end with
Guess I could try a timer between each instance but I can't see that helping since it is response bufferd on the server.
Perhaps I could try this other method of loading?
btw: There's docs ?
RE: view fckeditor twice in one site
this version works poperly..:
https://sourceforge.net/forum/forum.php ... _id=379487
it also addresses a number of other bugs.