[Webkit-unassigned] [Bug 59693] New: [Chromium] [Feature Request] Need SpellCheck API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 28 06:20:53 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=59693
Summary: [Chromium] [Feature Request] Need SpellCheck API
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: NEW
Keywords: InChromiumBugs
Severity: Normal
Priority: P2
Component: WebCore JavaScript
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: hbono at chromium.org
CC: dglazkov at chromium.org, morrita at google.com
Greetings,
>From the point of an extension developer, It would be great for WebKit to have a JavaScript API that encapsulates some functions of the TextCheckerHelper class.
I assume these functions are very useful for web-application developers to write a web application that integrates spell-checking functionarities:
* bool checkSpellingOfString(DOMString text, DOMString language)
Encapsulates TextCheckerClient::checkSpellingOfString(). That is, this function checks the spellings of the specified text with the spell-checker. If a spell-checker supports multiple languages, it uses the dictionary specified for the language parameter. This function returns true when the specified text is correct. Otherwise, it returns false.
* DOMStringList getSuggestions(DOMString queryWord, DOMString language)
Encapsulates TextCheckerClient::getSuggestions(). That is, this function returns the list of suggestions for the specified misspelled word. If the specified word is a correct word or the word does not have any suggestions. (The checkSpellingOfString() function should be used for distinguishing these cases.)
* void learnWord(DOMString word, DOMString language)
Encapsulates TextCheckerClient::learnWord(). That is, this function adds the specified word to the user-dictionary.
Also, this JavaScript function is pretty useful for those who write spell-checker extensions:
* void addMarker(Node node, long start, long length, DOMString suggestion)
Encapsulates DocumentMarkerController::addMaker(). That is, this function adds a misspelled underline and the suggestion to the specified range. (This function does not use a Range object because it is not so easy to use a Range object to specify text in a <textarea> element and an <input> element.
Regards,
Hironori Bono
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list