[api] extended default config

This commit is contained in:
maxkadushkin
2026-02-07 12:56:29 +03:00
parent 37b8c5d95a
commit 6b79fe0f06

View File

@ -379,6 +379,16 @@
var _self = this,
_config = config || {};
const injected_json = '{{CUSTOMIZATION_OBJECT}}';
if (injected_json.substring(2, 22) != 'CUSTOMIZATION_OBJECT') {
try {
const obj = JSON.parse(injected_json);
if (obj) {
extend(DocsAPI.DocEditor.defaultConfig, {editorConfig: {customization: obj}});
}
} catch (e) {}
}
extend(_config, DocsAPI.DocEditor.defaultConfig);
_config.editorConfig.canUseHistory = _config.events && !!_config.events.onRequestHistory;
_config.editorConfig.canHistoryClose = _config.events && !!_config.events.onRequestHistoryClose;