mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-09-24 16:40:55 -06:00
Update toolbar titles
Signed-off-by: Dmitry Mazurov <dimabzz@gmail.com>
This commit is contained in:
parent
32f3feb4a0
commit
1837d697f5
@ -1656,6 +1656,9 @@ function EasyMDE(options) {
|
||||
options.autosave.timeFormat = extend({}, timeFormat, options.autosave.timeFormat || {});
|
||||
}
|
||||
|
||||
// Merging the toolbar title, with the given options
|
||||
toolbarBuiltInButtons = extend({}, toolbarBuiltInButtons, options.toolbarTitles || {});
|
||||
|
||||
|
||||
// Merging the shortcuts, with the given options
|
||||
options.shortcuts = extend({}, shortcuts, options.shortcuts || {});
|
||||
@ -2279,13 +2282,9 @@ EasyMDE.prototype.createToolbar = function (items) {
|
||||
var i;
|
||||
for (i = 0; i < items.length; i++) {
|
||||
if (toolbarBuiltInButtons[items[i]] != undefined) {
|
||||
if (this.options.toolbarTitles != undefined && this.options.toolbarTitles[items[i]] != undefined) {
|
||||
items[i] = extend({}, toolbarBuiltInButtons[items[i]], this.options.toolbarTitles[items[i]]);
|
||||
} else {
|
||||
items[i] = toolbarBuiltInButtons[items[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var bar = document.createElement('div');
|
||||
bar.className = 'editor-toolbar';
|
||||
|
Loading…
x
Reference in New Issue
Block a user