diff --git a/src/js/simplemde.js b/src/js/simplemde.js index 016d693..f7923ce 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -109,7 +109,12 @@ function createIcon(options, enableTooltips, shortcuts) { } el.tabIndex = -1; - el.className = options.className; + + // Create icon element and append as a child to the button. + var icon = document.createElement("i"); + icon.className = options.className; + el.appendChild(icon); + return el; } @@ -2025,4 +2030,4 @@ SimpleMDE.prototype.toTextArea = function() { } }; -module.exports = SimpleMDE; \ No newline at end of file +module.exports = SimpleMDE;