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: Notes:-
· enableSaasSpellcheck should be true in the writer client config
· For the Spellcheck endpoint, by default, the method is POST. If your API spellcheck endpoint is GET then you need to specifically pass the method as GET
· "x-append-authorization": "Bearer Your Token" Add this property in the header if your API needs authentication to run
· For the Suggestion endpoint by default, the method is GET, if your API suggestion endpoint is POST then you need to specifically pass POST in the method. For GET request:
For POST request:
Field Description
Field | Description |
| Contains the configuration for external spellchecking endpoints. |
| 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. |
| Object containing configuration for external suggestion requests. |
| Required pass suggestions API endpoint |
| 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.
For making request using GET method:
For making request using POST method:
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.
For making GET request:
For making POST request:
Output
Last updated