Integrating External Spell Checking
It is possible to create your own Web API endpoints and integrate your own spell checking and suggestions into the Writer.
Writer Configuration
In order to enable the spellcheck integration, the Writer's client-config needs to be edited. The following should be added to the client configuration:
Field Description
Field | Description |
| Contains the configuration for external spellchecking endpoints. |
| Optional Object containing configuration for external spellcheck requests. |
| Required Full url and path to your check request implementation. |
| Optional Key-value object with extra header's which will be used in the request to your API. |
| Optional Object containing configuration for external suggestion requests. |
| Required Full url and path to your suggestion request implementation. |
| Optional Key-value object with extra header's which will be used in the request to your API. |
The headers
-properties are useful if you need to send additional headers to your API.
Remember to configure the external spellcheck service to allow cross-origin requests from the writer application url.
External API Specification
Your API needs to be able to handle the following requests to integrate with spell checking and suggestion.
Language Codes
Language codes from the writer are sent in the format [language-identifier]_[region_identifier]
. Where [language-identifier]
follows the ISO 639-1 standard, which is two letters, lowercased. The [region-identifier]
follows the ISO 3166-2 standard, which is two letters, uppercased.
Examples: sv_SE
, en_GB
, en_US
, nl_NL
Spellcheck Request
The API must be able to receive the following request on an endpoint you define:
Request
Response
The API should respond with a single array containing the misspelled words in the same json-format as they were sent, if no words were misspelled, response should contain an empty array.
Response Format
Example Request
The API should be able to perform the call below, and output an array of the misspelled words, or an empty array.
Output:
Suggestions
The API must be able to receive the following request on an endpoint you define:
Request
Response
The API should respond with a single array containing the misspelled words in the same json-format as they were sent, if no words were misspelled, response should be an empty array.
Response Format
Example Request
The API should be able to perform the call below, and output an array of words, or an empty array.
Output
Last updated