Skip to content

Commit

Permalink
Add suggestionMode to README
Browse files Browse the repository at this point in the history
  • Loading branch information
mooeypoo committed May 4, 2021
1 parent 06f1372 commit 94e2212
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -119,6 +119,14 @@ In the case of his/hers/her, the term is only ambiguous if the translation is fr

There are several configuration options available for the replacer.

### Suggestion mode

Using suggestion mode, the system will not replace the terms in the DOM, it will mark them (as it does replacements, with a wrapper span and given classes) and provide all available replacements in a `data-replacement-options` prop in the wrapper span.

The purpose of this is to enable frontend systems to then discuss available options for the text without outright changing it in the original.

To enable suggestio mode, set the config variable to `suggestionMode: true`

### CSS Classes

The replacer wraps each replacement with a `<span>` that has an associated class to it. The default class is `replaced-term`. This class name can be changed using the config property `termClass`.
Expand Down

0 comments on commit 94e2212

Please sign in to comment.