mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 23:54:28 -06:00
Fix bug creating icons
This commit is contained in:
parent
d05106a0ed
commit
096f6e9a6d
@ -28,7 +28,7 @@ function fixShortcut(name) {
|
|||||||
/**
|
/**
|
||||||
* Create icon element for toolbar.
|
* Create icon element for toolbar.
|
||||||
*/
|
*/
|
||||||
function createIcon(name, options, enableTooltips) {
|
function createIcon(options, enableTooltips) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var el = document.createElement('a');
|
var el = document.createElement('a');
|
||||||
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
||||||
@ -603,12 +603,10 @@ SimpleMDE.prototype.createToolbar = function(items) {
|
|||||||
for (var i = 0; i < items.length; i++) {
|
for (var i = 0; i < items.length; i++) {
|
||||||
(function(item) {
|
(function(item) {
|
||||||
var el;
|
var el;
|
||||||
if (item.name) {
|
if (item === '|') {
|
||||||
el = createIcon(item.name, item, self.options.toolbarTips);
|
|
||||||
} else if (item === '|') {
|
|
||||||
el = createSep();
|
el = createSep();
|
||||||
} else {
|
} else {
|
||||||
el = createIcon(item);
|
el = createIcon(item, self.options.toolbarTips);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bind events, special for info
|
// bind events, special for info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user