Actually i would like to modify the replaceWord function of the spellchecker.
I tried (in my own firefox extension) onInit:
original_replaceWord = InlineSpellCheckerUI.replaceWord;
InlineSpellCheckerUI.replaceWord = function()
{
// things i would like to do (i.e. set the Cursor to another spot in the editor)
// call of the original function
return original_replaceWord.apply(this, arguments);
};
But this didn’t seem to work, because this function was not called when i replaced a missspelled word.
How do i find the right function? Which one do i need to overwrite?
thx for any suggestions
Try this: (this is wrong. see the update below)UPDATE
InlineSpellCheckerUIdoes not have thereplaceWordfunction. ThereplaceWordfunction is defined in thensIInlineSpellCheckerinterface which is realized by themozInlineSpellCheckerclass in C++.So you cannot override the
replaceWordfunction. However, you can try overriding thereplaceMisspellingfunction inInlineSpellCheckerUIusing the code below. I think it should serve your purpose.