Overview
The Spell Check plugin provides real-time spelling and grammar assistance. As users type, common spelling mistakes and grammar issues are automatically detected and suggestions are provided for corrections.
Features
- ✓ Real-time spell checking
- ✓ Grammar assistance
- ✓ Multi-language support
- ✓ Custom dictionaries
- ✓ Suggestion dropdown
- ✓ Ignore/Add words
- ✓ Style suggestions
- ✓ Undo corrections
Installation
npm install @editora/plugin-spell-check
Basic Usage
import Editora from '@editora/core';
import SpellCheckPlugin from '@editora/plugin-spell-check';
const editor = new Editora('#editor');
editor.use(SpellCheckPlugin, {
language: 'en',
enableGrammar: true
});
Using Spell Check
Work with spelling assistance:
- Detection: Errors appear underlined as you type
- Suggest: Right-click for correction suggestions
- Ignore: Skip single instance or all instances
- Learn: Add words to custom dictionary
Configuration Options
| Option | Type | Description |
|---|---|---|
| language | string | Language code (en, es, fr, de, etc.) |
| enableGrammar | boolean | Enable grammar checking (default: true) |
API Methods
- checkSpelling(): Check entire document
- addWord(word): Add word to dictionary
- ignorWord(word): Ignore word in current session
- getSpellErrors(): Get list of all spelling errors