To enable the WProofreader, use the plug-in Initialization PL/SQL Code attribute.
The attribute supports basic configuration cross-application using component settings.
UC_FROALA_RTE.g_plug_spellcheck_api := 'API KEY';
UC_FROALA_RTE.g_plug_spellcheck_enable := true;
UC_FROALA_RTE.g_plug_spellcheck_js := 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js';
-- supported values are described in WProofreader JavaScript options documentation
UC_FROALA_RTE.g_plug_spellcheck_lang := 'en_US'; -- options.lang
UC_FROALA_RTE.g_plug_spellcheck_ui_lang := 'en'; -- options.localization
UC_FROALA_RTE.g_plug_spellcheck_theme := 'gray'; -- options.theme
UC_FROALA_RTE.g_plug_spellcheck_badge_enable := true; -- options.enableBadgeButton
UC_FROALA_RTE.g_plug_spellcheck_badge_lang := true; -- options.enableLanguagesInBadgeButton
Initialization JavaScript Code
Use the plug-in attribute to configure WProofreader using available JavaScript options.
function( pOptions ) {
pOptions.wproofreader = {
"autocorrect" : checkTypes.indexOf("autocorrect") > -1,
"autocomplete" : checkTypes.indexOf("autocomplete") > -1,
"actionItems" : apex.item('P1444_WPROOF_ACTION_ITEMS').getValue(),
"settingsSections" : apex.item('P1444_WPROOF_SETTINGS_SECTIONS').getValue(),
"grammarSuggestions" : checkTypes.indexOf("enableGrammar") > -1,
"spellingSuggestions" : checkTypes.indexOf("spellingSuggestions") > -1,
"styleGuideSuggestions" : checkTypes.indexOf("styleGuideSuggestions") > -1,
"disableOptionsStorage" : ['all']
};
return pOptions;
}