diff --git a/README.md b/README.md index ab4a974..9235c57 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ simplemde.value(); - Optionally, you can set an array of status bar elements to include, and in what order. - **toolbar**: If set to `false`, hide the toolbar. Defaults to the [array of icons](#toolbar-icons). - **toolbarTips**: If set to `false`, disable toolbar button tips. Defaults to `true`. +- **toolbarGuideIcon**: If set to `false`, disable guide icon in the toolbar. Defaults to `true`. - **autofocus**: If set to `true`, autofocuses the editor. Defaults to `false`. - **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`. - **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`. diff --git a/source files/simplemde.js b/source files/simplemde.js index c6d71db..be19fcb 100644 --- a/source files/simplemde.js +++ b/source files/simplemde.js @@ -453,7 +453,6 @@ var toolbar = [{ className: "fa fa-eye", title: "Toggle Preview (Ctrl+P)", }, - "|", { name: "guide", action: "http://nextstepwebs.github.io/simplemde-markdown-editor/markdown-guide", @@ -621,6 +620,9 @@ SimpleMDE.prototype.createToolbar = function(items) { self.toolbar = {}; for (var i = 0; i < items.length; i++) { + if(items[i].name == "guide" && self.options.toolbarGuideIcon === false) + continue; + (function(item) { var el; if (item === '|') {