Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Provides access to the data of the configured SpellCheck-Tool (e.g. LanguageTool).

URLMethodsParametersDescription

/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/matchesPOST

text: string; the text that is checked (eg. "Xyz.")
language: string; the code of the language for the check (eg. "de-AT")

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)"

codestringThe 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

messagestringdescription of the found the error (e.g. "Rechtschreibfehler gefunden")
shortMessagestringshort message about the error (e.g. "Rechtschreibfehler")

replacements

array

List of suggested replacements.

offsetintegerPosition of the found error in the given text.
lengthintegerNumber of characters in the given text that belong to this error.
contextobjectoffset, length and the text that has been checked
sentencestringthe 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.

categoryobjectid and name of the error's category


More about the responses from the LanguageTool: https://languagetool.org/http-api/swagger-ui/#/

...