I tried putting two editors on one page, but it is only possible to edit within the last editor placed on the page. I can highlight things in the other editors, but cant get a blinking cursor and cant type anything.
I tested on Firefox 1.0 and Mozilla 1.7.3.
Does this work for anyone else? Is this a known bug?
Here is the code that can reproduce this:
-------------------------------------------------------------
<br>
<br>
-------------------------------------------------------------------------------
I tested on Firefox 1.0 and Mozilla 1.7.3.
Does this work for anyone else? Is this a known bug?
Here is the code that can reproduce this:
-------------------------------------------------------------
<?php require_once('/var/www/html/javascript/fckeditor/fckeditor.php'); $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = '/javascript/fckeditor/'; $oFCKeditor->Value = "hello"; $oFCKeditor->Create(); ?>
<br>
<br>
<?php $oFCKeditor2 = new FCKeditor('FCKeditor2') ; $oFCKeditor2->BasePath = '/javascript/fckeditor/'; $oFCKeditor2->Value = "world"; $oFCKeditor2->Create(); ?>
-------------------------------------------------------------------------------
RE: 2.0 RC 3: Multiple Editors on 1 page brok
RE: 2.0 RC 3: Multiple Editors on 1 page brok
Thank you for this great piece of software!
RE: 2.0 RC 3: Multiple Editors on 1 page broken
RE: 2.0 RC 3: Multiple Editors on 1 page broken
Her i some code with two editor that also work in Firefox:
var oFCKeditor = new FCKeditor('NyhetTekst','100%','450') ;
oFCKeditor.Config['CustomConfigurationsPath'] = '/include/myfckconfig2.js' ;
oFCKeditor.BasePath = '/fckeditor/' ;
oFCKeditor.ToolbarSet = 'NyhetTekst';
setTimeout(function() { oFCKeditor.ReplaceTextarea();}, 500);
oFCKeditor2 = new FCKeditor('NyhetInnledning','100%','150') ;
oFCKeditor2.Config['CustomConfigurationsPath'] = '/include/myfckconfig2.js' ;
oFCKeditor2.BasePath = '/fckeditor/' ;
oFCKeditor2.ToolbarSet = 'NyhetInnledning2';
setTimeout(function() { oFCKeditor2.ReplaceTextarea();}, 500);
I have not invastigated how long to set the delay, but maube other nows more about this.
RE: 2.0 RC 3: Multiple Editors on 1 page brok
I have a similar problem (also) and have a page with more than two editors (created dinamically, may be dozen of them).
Here's the solution I am using - based on Asbjrn's and similar to the one FCKeditor authors used in their code, create a queue and empty it slowly .
<script type="text/javascript">
var proceed_with_next = new Boolean;
proceed_with_next = true;
var oFCKeditors = new Array(); // queue
var oFCKeditors_intID; // setInterval ID
function FCKeditor_OnComplete(editorInstance) {
// ... do something if you want here ...
proceed_with_next = true;
}
function oFCKeditors_ReplaceTextarea(init) {
var x;
if (oFCKeditors.length == 0) {
clearInterval(oFCKeditors_intID);
proceed_with_next_semaphore = true;
if (init) init();
} else {
if (!proceed_with_next_semaphore) return;
proceed_with_next_semaphore = false;
x = oFCKeditors[oFCKeditors.length - 1];
oFCKeditors.length = oFCKeditors.length - 1;
x.ReplaceTextarea();
}
}
function fillUp() {
var j = 0;
oFCKeditors[j] = new FCKeditor('one');
oFCKeditors[j].ToolbarSet = 'MySet';
j++;
oFCKeditors[j] = new FCKeditor('two');
oFCKeditors[j].ToolbarSet = 'MySet';
j++;
// ...
oFCKeditors_intID = setInterval("oFCKeditors_ReplaceTextarea(false)", 50);
}
</script>
RE: 2.0 RC 3: Multiple Editors on 1 page brok
That would eliminate the load time as well. Don't know about different toobarsets tho... hrm...
Just a thought....