Firefox v2 comes with a built-on spell checker for text areas. I'd like to make use of it with FCKeditor-enabled fields, but right-click opens FCKeditor-specific menus ... as it should. However, is there a way to get access to the Firefox-specific spell-check menu? I tried ctrl-right-click, but this did not differ from the standard right-click. Thanks
Fri, 06/01/2007 - 00:05
#1
RE: Firefox v2 spellchecking
Why nobody ever bothers to check the plugins section?
Here's a plugin to handle the Fx2 spellchecker: https://sourceforge.net/tracker/index.p ... tid=737639
RE: Firefox v2 spellchecking
RE: Firefox v2 spellchecking
Therefore it would be nice if the spelling options of FF 2.0 will be in some easier way accessible in FCKeditor area.
RE: Firefox v2 spellchecking
//called from onLoad event
function loadEditor() {
var fckEditor = new FCKeditor("editText", 800, 400);
fckEditor.BasePath = "/fckeditor/";
fckEditor.ReplaceTextarea();
//Give edit control time to commplete initialization
setTimeout("noContextMenu(\'editText\')", 1000);
}
//disable editor's context menu and allow firefox 2 spellchecking
function noContextMenu (fieldId) {
var iframe1 = document.getElementById(fieldId + '___Frame')
var iframe2 = iframe1.contentWindow.document.getElementById('xEditingArea').firstChild
iframe2.contentDocument.removeEventListener("contextmenu", iframe1.contentWindow.FCKContextMenu_Document_OnContextMenu, false);
}
window.addEventListener("load", loadEditor, false);
RE: Firefox v2 spellchecking
This plugin is very useful many thanks
, i just have some requests :
- language dictionnary detection (from fck language parameter), i think you know what i mean
- When the plugin is loaded the default configuration put the plugin in "enable" mode and contextual fckeditor menus are replaced by ff2 menus, it could be very disturbing for end user; just put the plugin in "disable" mode by default, and everything will be fine .... Behavior will change only when user will decide it.
Changing this behavior will resolve another problem : what's happen if plugin is enable, and rtSpellCheck toolbar button is hidden : no way to make fckeditor contextual menus operational.
I hope you understand my suggestions.
Many thanks
jean-mat
RE: Firefox v2 spellchecking
One reason would be that the language detection of FCKeditor is based just on the browser, so you would always get the same default language as your browser.
The second and more important is that to manipulate that I would need to write a Firefox extension as normal javascript can't manipulate that. There is one extension that tries to adjust the language according to the lang attribute, but I think that it doesn't work flawlessly, and I think that the proper solution would be to autodetect the language based just on the number of errors. Usually a person will have 2 or 3 dictionaries installed at most, so try to spellcheck with each one and choose the one that brings less errors.
2nd:
oh, I thought that it started disabled on first run, I'll try to check it to make sure that it doesn't do anything strange on first run or if the button is removed from the toolbar. I'll post as soon as I can test it.
Regards
RE: Firefox v2 spellchecking
I've also marked the button as non-context sensitive so it will save a little some cpu cycles.
RE: Firefox v2 spellchecking
I have tried integrating this plugin and I keep getting the Unknown toolbar item "rtSpellCheck" error. I have added "FCKConfig.Plugins.Add( 'rtSpellCheck' ) ;" to the config file and changed the 'SpellCheck' to 'rtSpellCheck' as instructed. The folder is in the plugins folder, permissions are ok so now I'm stuck.
I am on WinXP-SP2 and FireFox 2.
Anyone any suggestions?
Thanks in advance.
RE: Firefox v2 spellchecking
Did you tried to use other plugins? the installation should be just the same.
RE: FF2 spellchecking: single line solultion
----------------
function FCKeditor_OnComplete(fckEditor) {
fckEditor.EditorDocument.removeEventListener("contextmenu",fckEditor.EditorWindow.parent.FCKContextMenu_Document_OnContextMenu,false);
}
The FCKeditor_OnComplete is called for each editor instance after it loads and all event
listeners are in place, and is the ideal place make runtime configuration changes. Good luck.
----------------
In this case, don't rename the "contextmenu" to your fck editor textarea.
Re: Firefox v2 spellchecking
I have cleared the cache and confirmed that everything seems the same live and local - any ideas?
i'm using IIS 6 and FF 2 php 5 local and apache with FF s and php 5 on the live site..
thanks