OK.
I have gotten hidden divs to work in both ie and ff in all cases but one. IE works fine, but the gekko hack barfs out when using more than one editor.
see below.
http://eureka.ext.usu.edu/admin/com/edi ... s/004.html
Anyone have any ideas?
Thanks FCK for your hard work. My original hidden div test page is not working!
http://eureka.ext.usu.edu/admin/test.cfm
-J
Wed, 06/08/2005 - 18:46
#1
RE: hidden div in gekko
function Show()
{
document.getElementById('eEditor').style.display = '' ;
document.getElementById('eNoEditor').style.display = 'none' ;
// This is a hack for Gecko... it stops editing when the editor is hidden.
if ( !document.all )
{
var oEditor = FCKeditorAPI.GetInstance( 'FCKeditor1' ) ;
var oEditor2 = FCKeditorAPI.GetInstance( 'FCKeditor2' ) ;
oEditor.EditorDocument.designMode = "off" ;
oEditor.EditorDocument.designMode = "on" ;
oEditor.Focus() ;
oEditor.ToolbarSet.RefreshItemsState() ;
oEditor2.EditorDocument.designMode = "off" ;
oEditor2.EditorDocument.designMode = "on" ;
oEditor2.Focus() ;
oEditor2.ToolbarSet.RefreshItemsState() ;
}
}
RE: hidden div in gekko
Thanks for you input. I tried it and it still gives an error, although a new and different error
it seems like this hack works a little better, but it still barfs out using 2 editors.
hmmmmmm. It almost seems like the 2 instances are conflicting with each other.
FCK, got any suggestions?
RE: hidden div in gekko
Well they say a change is as good as a holiday
If you can't get it working, you might have to try my iframe approach.
An early prototype of the method I now use in my CMS is here:
http://publicdemo.dev.lateralsystems.ne ... e_demo.htm
It's not perfect, but let me know if you're interested and I'll incorporate into the demo some of the features that later found their way into our CMS.
RE: hidden div in gekko
(NOW working...) sorry for the typo
RE: hidden div in gekko
I am trying to get this to work as well. One editor works fine, but two editors gives me this error:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.designMode]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/path/to/file.php :: Show :: line 2023" data: no]
Any suggestions? One editor is fixed perfectly (and it works for either depending on order), just the 2nd neever does.
RE: hidden div in gekko
oEditor2.EditorDocument.designMode = "on" ;
call in the fck code. I Believe it is a bug in Firefox, not with fck editor itself. That designMode call is a Gecko function and it is throwing an exception.
One thing I did find out is that you can reload the broken editor with this code, and it will work again:
var oEditor = FCKeditorAPI.GetInstance(fckEditorName);
document.getElementById(fckEditorName).value = oEditor.GetXHTML( true );
document.getElementById(fckEditorName+"___Frame").src = document.getElementById(fckEditorName+"___Frame").src;
RE: hidden div in gekko