aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/spellchecker.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/spellchecker.js')
-rw-r--r--src/webview/spellchecker.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/webview/spellchecker.js b/src/webview/spellchecker.js
new file mode 100644
index 000000000..ec8807874
--- /dev/null
+++ b/src/webview/spellchecker.js
@@ -0,0 +1,14 @@
1import { SpellCheckHandler, ContextMenuListener, ContextMenuBuilder } from 'electron-spellchecker';
2
3window.spellCheckHandler = new SpellCheckHandler();
4setTimeout(() => {
5 window.spellCheckHandler.attachToInput();
6}, 1000);
7
8// TODO: should we set the language to user settings?
9// window.spellCheckHandler.switchLanguage('en-US');
10
11const contextMenuBuilder = new ContextMenuBuilder(window.spellCheckHandler);
12const contextMenuListener = new ContextMenuListener((info) => { // eslint-disable-line
13 contextMenuBuilder.showPopupMenu(info);
14});