Hi to everyone!
I want to ask you a question. How dynamically add and then remove editor from HTML without errors?
I tried to use ONE shared toolbar to manipulate multiple editor windows. First editor window and toolbar i created within PHP (fckeditor.php):
It is OK. Then i tried dynamically add another editor window (textarea) within Javascript:
Then try to convert textarea to WYSIWYG:
It is OK. But if i try to remove this additonal editor from HTML in Firefox 2.0 i get an error in Firebug:
I want to ask you a question. How dynamically add and then remove editor from HTML without errors?
I tried to use ONE shared toolbar to manipulate multiple editor windows. First editor window and toolbar i created within PHP (fckeditor.php):
include_once ($this->VsRoot . "fckeditor.php"); $VoManager = new FCKeditor ($VsName); $VoManager->BasePath = $this->VsUrl; $VoManager->ToolbarSet = "Custom"; $VoManager->Config [ 'ToolbarLocation' ] = 'Out:vispanel'; $VoManager->Create ();
It is OK. Then i tried dynamically add another editor window (textarea) within Javascript:
var VsCreation = document.getElementById ("visarea"); var VsName = document.getElementById ("visname"); var VsBlock = "<textarea name='" + VsClass + VsName.value + "' rows='5' cols='5'></textarea><a onclick='SetVisualBlock (\"" + VsClass + VsName.value +"\")'>View Block</a>"; VsCreation.innerHTML += VsBlock;
Then try to convert textarea to WYSIWYG:
var VsBase = location.protocol + "//" + location.hostname + "/system/component/view/script/"; VoManager = new FCKeditor (VsName); VoManager.BasePath = VsBase; VoManager.Height = 100; VoManager.ToolbarSet = "Custom"; VoManager.Config [ "ToolbarLocation" ] = "Out:vispanel"; VoManager.ReplaceTextarea ();
It is OK. But if i try to remove this additonal editor from HTML in Firefox 2.0 i get an error in Firebug:
FCKBrowserInfo is not defined [Break on this error] var FCK={Name:FCKURLParams['InstanceName'],Status:0,EditMode:0,Toolbar:null,HasF... fckeditorcode_gec... (line 31) FCKCommands is not defined [Break on this error] var FCKCommands=FCK.Commands={};FCKCommands.LoadedCommands={};FCKCommands.Regist...
Re: Bug with multiple editor windows and shared toolbar
And after it Toolbar doesn't work.