# Suggestion pop-up

The suggestion pop-up appears when a user hovers over a marked word. It shows spelling, grammar, or style suggestions along with action items.

#### Number of suggestions by type

Use `suggestionsCountByType` to set different limits per suggestion type. Default: `{ spelling: 3, grammar: 5, style: 6 }`.

```js
suggestionsCountByType: {
  spelling: 5,
  grammar: 3,
  style: 4
}
```

**Legacy option**

The older `suggestionsCount` option sets a single limit for all types. If `suggestionsCount` is set to a value other than `3`, it takes priority over `suggestionsCountByType`.

```js
suggestionsCount: 5
```

#### More suggestions submenu

By default, additional suggestions aren't shown. To add a "More suggestions" submenu:

```js
moreSuggestionsCount: 5,
```

#### Hide suggestion type labels

To hide the suggestion type label (spelling, grammar, style) in the pop-up:

```js
disableTypeInSuggestionPopup: true,
```

#### Hide suggestion descriptions

To hide the explanation text for grammar and style issues:

```js
disableProblemDescription: true
```

This applies to both the suggestion pop-up and the proofread dialog.

#### Action items

The `actionItems` parameter controls which commands appear in the suggestion pop-up, badge, and proofread dialog. Default:

```js
actionItems: ['addWord', 'ignoreAll', 'ignore', 'report', 'disableRule', 'settings', 'toggle', 'proofreadDialog']
```

Not all actions appear in every location. The suggestion pop-up shows suggestion-specific actions, while the badge only shows **Settings**, **Toggle**, and **Proofread in dialog**.

| Value               | Description                                                                                                                                       |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `'addWord'`         | Add the word to the user dictionary.                                                                                                              |
| `'ignore'`          | Ignore this occurrence of the word.                                                                                                               |
| `'ignoreAll'`       | Ignore all occurrences of the word in the current session.                                                                                        |
| `'report'`          | Report a suggestion as incorrect.                                                                                                                 |
| `'disableRule'`     | Disable the rule behind the suggestion for the current browser session. Errors matching this rule won't be underlined until the page is reloaded. |
| `'settings'`        | Open the Settings dialog.                                                                                                                         |
| `'toggle'`          | Enable or disable WProofreader.                                                                                                                   |
| `'proofreadDialog'` | Open the proofread in dialog mode.                                                                                                                |

To prevent users from adding words to their dictionary, remove `'addWord'`. To hide the settings icon, remove `'settings'`. To hide the report option, remove `'report'`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wproofreader.com/v6.12.0/integrations/initialization/configuration-options/ui-elements/suggestion-pop-up.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
