1441 |
ariadna |
1 |
define("tiny_aiplacement/options",["exports","editor_tiny/options","tiny_aiplacement/common"],(function(_exports,_options,_common){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.register=_exports.isTextAllowed=_exports.isPolicyAgreed=_exports.isImageAllowed=_exports.getUserId=_exports.getContextId=void 0;
|
|
|
9 |
const contextIdName=(0,_options.getPluginOptionName)(_common.pluginName,"contextid"),userIdName=(0,_options.getPluginOptionName)(_common.pluginName,"userid"),textAllowedName=(0,_options.getPluginOptionName)(_common.pluginName,"generate_text"),imageAllowedName=(0,_options.getPluginOptionName)(_common.pluginName,"generate_image"),policyAgreedName=(0,_options.getPluginOptionName)(_common.pluginName,"policyagreed");_exports.register=editor=>{const registerOption=editor.options.register;registerOption(contextIdName,{processor:"number",default:0}),registerOption(userIdName,{processor:"number",default:0}),registerOption(textAllowedName,{processor:"boolean",default:!1}),registerOption(imageAllowedName,{processor:"boolean",default:!1}),registerOption(policyAgreedName,{processor:"boolean",default:!1})};_exports.getContextId=editor=>editor.options.get(contextIdName);_exports.getUserId=editor=>editor.options.get(userIdName);_exports.isTextAllowed=editor=>editor.options.get(textAllowedName);_exports.isImageAllowed=editor=>editor.options.get(imageAllowedName);_exports.isPolicyAgreed=editor=>editor.options.get(policyAgreedName)}));
|