This feature hasn't been released as of yet and
everything in regards to web integration is subject to change so any
implementation you attempt to develop will more than likely break.
Integrating SpellBound into a web page is made possible with the use of
DOM Events which provides a barrier so a web page is unable to acquire
privileges not explicitly granted by a user. Web integration samples can
be viewed on the Tests page and are available for
download.
Below I have outlined the basic functions for integrating SpellBound
into a web page.
If you develop an integration solution that you believe
others would appreciate and you are willing to share it (e.g. no license
or an appropriate license as in MPL, GPL, LGPL, etc.) please let me know by
using the Contact form.
// when a Mozilla based browser loads the page this // function is called and changes onclick to use SpellBound function sbOnLoad() { var elems = document.getElementsByTagName("input"); for (var i = 0; i < elems.length; i++) { if (elems[i].hasAttribute("onclick")) { var onClick = elems[i].getAttribute("onclick"); if (onClick.indexOf("checkdocspelling") != -1) { elems[i].setAttribute("onclick", "SpellBound.checkSpellingAll();"); } else if (onClick.indexOf("checknodespelling") != -1) { var params = onClick.substring(onClick.indexOf("checknodespelling") + 17); elems[i].setAttribute("onclick", "SpellBound.checkSpellingNode" + params); } } } } // this function is called when a Mozilla based browser launches // SpellBound from a web element and doesn't have SpellBound installed. function sbNotInstalled() { // the download above provides sample code } // this function is called when a Mozilla based browser launches // SpellBound from a web element and an upgrade to SpellBound is required. function sbNeedsUpgrade() { // the download above provides sample code } // this function is called when the status of SpellBound changes // (e.g. spellcheck start and stop) function sbStatus() { var elems = document.getElementsByTagName("input"); for (var i = 0; i < elems.length; i++) { if (elems[i].hasAttribute("onclick")) { var onClick = elems[i].getAttribute("onclick"); if (onClick.indexOf("SpellBound.") != -1) { if (SpellBound.active) { elems[i].setAttribute("disabled", "true"); } else { if (elems[i].hasAttribute("disabled")) elems[i].removeAttribute("disabled"); } } } } }
Copyright © 2004-2005 Robert Strong All rights reserved
Valid XHTML 1.1 served as text/html - Page Last Updated: Apr. 17, 2005
Valid XHTML 1.1 served as text/html - Page Last Updated: Apr. 17, 2005