How to add new words to dictionary for use it in the future for spellcheking

Hi, my Document Server is on a Debian 11, with docker, and we use the last stable FireFox version.

We have an integration with Nextcloud and we are new users to OnlyOffice.

My question is, ¿How can I add new words to my dictionary when I ran the spellchecker and find a word that I want to add it to my dictionary?

Sorry for my english and my mistakes when I’m writing, I’m not native speaker.
Thank you for your help!
Juan Fortuna

Hello @jfortuna

Unfortunately, you cannot add custom words to the spellchecker through editors interface.

Only possible way right now is by editing the .dic file for the required language in appropriate directory in /var/www/onlyoffice/documentserver/dictionaries/ inside the container. For example, if you want to edit dictionary for Spanish then you have to edit es_ES.dic in /var/www/onlyoffice/documentserver/dictionaries/es_ES.
It is important that the .dic file is edited according to the HunSpell rules the way described here https://www.chromium.org/developers/how-tos/editing-the-spell-checking-dictionaries.
After that you need to clear browser cache. Note that every user will have to clear browser cache too in order to see the newly added words.

To reset cache for everyone please follow this instruction:

  1. Make whole server backup\snapshot just in case;
  2. Open the /var/www/onlyoffice/documentserver/web-apps/apps/api/documents/api.js file and find the following section:
function getAppParameters(config) {
var params = "?_dc=**x.x.x-x**" ;

(where x.x.x-x is the current version of the Document Server);

  1. Replace the x.x.x-x value with an arbitrary one. The "x " can be any number, but the value must be kept in the same format: "x.x.x-x ". For example, if you currently have version 7.2.2-56, you could change it to 7.4.0-121 in the file;
  2. Save and close the file;
  3. Open /etc/onlyoffice/documentserver/nginx/includes/ds-docservice.conf;
  4. Find the three occurrences of the same value "x.x.x-x ", replace it with the one you used in api.js and save the file;
  5. Run the following commands:
    cd /usr/bin
    documentserver-generate-allfonts.sh
    service nginx restart

After that cache will be reset for all users.

Is there a plan to add this feature functionality to the UI?

Hello @charles

Indeed, suggestion to add possibility to add words to the spellchecker is already registered, I’ve added your request to it. Once we get any news on it, I will update the thread.

1 Like