Overview
OpenFin leverages the Chrome spell-check provider to offer Spell-Check Highlighting. Spell-Check Highlighting is enabled using the Application Configuration, or in a windows options object passed into a Window constructor, by adding the `”spellCheck”: true` parameter.
Enabling Spell Check Highlighting for an Application
To enable Spell Check Highlighting for an application `”spellCheck”: true` needs to be added to the startup_app object in the Application Configuration file, for example:
"startup_app": {
"name": "MyApp",
"uuid": "33aa9062-9eb0-4875-b819-c90f38ef03ea",
"url": "http://localhost:8000/index.html",
"spellCheck" : true,
...
}
Once added to the application configuration, the spellcheck needs to be enabled for each element as normal.
Enabling Spell Check Highlighting for a Window
To enable Spell Check Highlighting for an application `”spellCheck”: true` needs to be added to the Window Options object passed to the window constructor, for example:
async function createWindow() {
const winOption = {
name:'child',
defaultWidth: 300,
defaultHeight: 300,
url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
frame: true, autoShow: true,
spellCheck: true
};
return await fin.Window.create(winOption);
};
createWindow()
.then(() => console.log('Window is created'))
.catch(err => console.log(err));
Comments
0 comments
Please sign in to leave a comment.