Provides access to the data of the configured SpellCheck-Tool (e.g. LanguageTool).
URL | Methods | Parameters | Description |
---|---|---|---|
/editor/plugins_spellcheck_spellcheckquery/languages | GET | targetLangCode: string; the language-code of the language that is supposed to be checked by the tool (eg. "de-AT") | returns a JSON with the found language, format see below. If the language is not supported, the SpellCheck is not started. |
/editor/plugins_spellcheck_spellcheckquery/matches | POST | text: string; the text that is checked (eg. "Xyz.") | returns a JSON with the results of the check, including the matches found (format of matches see below) |
Languages: result format
(bold = used by translate5)
Name | Type | Info |
name | string | The name of the language, e.g. "German (Austria)" |
code | string | The language-code, e.g. "de" |
longCode | string | The long code, e.g. "de-AT"; used for the language-param when requesting the matches |
Matches: result format
(bold = used by translate5)
Name | Type | Info |
message | string | description of the found the error (e.g. "Rechtschreibfehler gefunden") |
shortMessage | string | short message about the error (e.g. "Rechtschreibfehler") |
replacements | array | List of suggested replacements. |
offset | integer | Position of the found error in the given text. |
length | integer | Number of characters in the given text that belong to this error. |
context | object | offset, length and the text that has been checked |
sentence | string | the text that has been checked |
rule | object | If urls are included, the ContextMenu shows them for further information. |
issueType | string | type of error (e.g. "misspelling"); used for different colors of the marked matches. |
category | object | id and name of the error's category |
More about the responses from the LanguageTool: https://languagetool.org/http-api/swagger-ui/#/
...