From 52cba119f4fb679b88533c6dc03743f8201e897c Mon Sep 17 00:00:00 2001 From: Mike Angstadt Date: Thu, 20 Oct 2016 14:44:48 -0500 Subject: [PATCH] added support for text-based toolbar options Added the ability to pass innerHTML text for toolbar icon anchors. --- src/js/simplemde.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/simplemde.js b/src/js/simplemde.js index 016d693..5c27da8 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -108,6 +108,10 @@ function createIcon(options, enableTooltips, shortcuts) { } } + if(options.innerHTML) { + el.innerHTML = options.innerHTML; + } + el.tabIndex = -1; el.className = options.className; return el; @@ -2025,4 +2029,4 @@ SimpleMDE.prototype.toTextArea = function() { } }; -module.exports = SimpleMDE; \ No newline at end of file +module.exports = SimpleMDE;