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 || {});
|
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
|
// Merging the shortcuts, with the given options
|
||||||
options.shortcuts = extend({}, shortcuts, options.shortcuts || {});
|
options.shortcuts = extend({}, shortcuts, options.shortcuts || {});
|
||||||
@ -2279,11 +2282,7 @@ EasyMDE.prototype.createToolbar = function (items) {
|
|||||||
var i;
|
var i;
|
||||||
for (i = 0; i < items.length; i++) {
|
for (i = 0; i < items.length; i++) {
|
||||||
if (toolbarBuiltInButtons[items[i]] != undefined) {
|
if (toolbarBuiltInButtons[items[i]] != undefined) {
|
||||||
if (this.options.toolbarTitles != undefined && this.options.toolbarTitles[items[i]] != undefined) {
|
items[i] = toolbarBuiltInButtons[items[i]];
|
||||||
items[i] = extend({}, toolbarBuiltInButtons[items[i]], this.options.toolbarTitles[items[i]]);
|
|
||||||
} else {
|
|
||||||
items[i] = toolbarBuiltInButtons[items[i]];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user