Quantcast

Force spell check in content editable div in xulrunner

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Force spell check in content editable div in xulrunner

Douglas Livingstone
Hello,

I have an xulrunner app structured like this:

<window>
<browser id="browser" src="http://localhost/mypage.htm"/>
</window>

And mypage.htm has a structure like this:

<html><body>
<div style="border: 1px solid red; min-height: 60px;" id="c"
contenteditable="true">Speeling <b>mistak</b></div>
</body></html>

What I would like to do, is hook up, say, F7, so that when pressed, I
work through the div, alerting the user to spelling mistakes.

Inside browser.onkeypress I can check for F7, and find the div using:

document.activeElement.contentWindow.document.getElementById("c");

Is there a library/something I can call to spell check this, like
using InlineSpellCheckerUI to populate spellcheck context menus?

If there are no errors, I would like to display a "Spell check
complete, no errors found" window.

Thanks,
Douglas
_______________________________________________
dev-tech-editor mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-editor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Force spell check in content editable div in xulrunner

Neil-4
Douglas wrote:

>Is there a library/something I can call to spell check this, like using InlineSpellCheckerUI to populate spellcheck context menus?
>
You may be able to base something off SeaMonkey/Thunderbird's spell
check dialogs.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-editor mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-editor
Loading...