mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 12:46:03 +08:00
Merge pull request '[DE] Set color for default heading styles' (#247) from feature/de-headings-color into release/v8.3.0
This commit is contained in:
@ -257,7 +257,8 @@
|
||||
submitForm: {
|
||||
visible: true/false (default: true)
|
||||
resultMessage: 'text'/''/null/undefined // if '' - don't show a message after submitting form, null/undefined - show the default message
|
||||
}
|
||||
},
|
||||
wordHeadingsColor: '#00ff00' // set color for default heading styles in document editor
|
||||
},
|
||||
coEditing: {
|
||||
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor
|
||||
@ -1207,6 +1208,10 @@
|
||||
params += "&indexPostfix=_loader";
|
||||
}
|
||||
}
|
||||
if (config.editorConfig && config.editorConfig.customization && config.editorConfig.customization.wordHeadingsColor && typeof config.editorConfig.customization.wordHeadingsColor === 'string') {
|
||||
params += "&headingsColor=" + config.editorConfig.customization.wordHeadingsColor.replace(/#/, '');
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
@ -128,10 +128,13 @@ define([
|
||||
// Create and render main view
|
||||
this.viewport = this.createView('Viewport').render();
|
||||
|
||||
this.api = new Asc.asc_docs_api({
|
||||
'id-view' : 'editor_sdk',
|
||||
'translate': this.getApplication().getController('Main').translationTable
|
||||
});
|
||||
var config = {
|
||||
'id-view' : 'editor_sdk',
|
||||
'translate': this.getApplication().getController('Main').translationTable
|
||||
},
|
||||
hcolor = (/(?:&|^)headingsColor=([^&]+)&?/i).exec(window.location.search.substring(1));
|
||||
hcolor && (config['headings-color'] = '#' + hcolor[1]);
|
||||
this.api = new Asc.asc_docs_api(config);
|
||||
|
||||
this.header = this.createView('Common.Views.Header', {
|
||||
headerCaption: 'Document Editor',
|
||||
|
||||
@ -461,6 +461,8 @@ class MainController extends Component {
|
||||
'mobile' : true,
|
||||
'translate': _translate
|
||||
};
|
||||
let hcolor = (/(?:&|^)headingsColor=([^&]+)&?/i).exec(window.location.search.substring(1));
|
||||
hcolor && (config['headings-color'] = '#' + hcolor[1]);
|
||||
this.api = isPDF ? new Asc.PDFEditorApi(config) : new Asc.asc_docs_api(config);
|
||||
|
||||
Common.Notifications.trigger('engineCreated', this.api);
|
||||
|
||||
Reference in New Issue
Block a user