refactory-id / bootstrap-markdown

Bootstrap plugin for markdown editing
Apache License 2.0
1.99k stars 371 forks source link

Hide all button #183

Closed dungphanxuan closed 8 years ago

dungphanxuan commented 9 years ago

Hello, i want to hide all button, and only show textarea. so what option to config! thank

toopay commented 9 years ago

I dont get it. You should just use textarea?

jasonpolites commented 9 years ago

I want to do the same thing. The idea is to allow the use of markdown syntax with the preview feature, and default to rendering the formatted version, but not add the UI for the toolbar itself. Basically what gihub does right here in this issue editor.

AlissonRS commented 8 years ago

@dungphanxuan and @jasonpolites As far as I've read the source code from bootstrap-markdown.js, this can be achieved by passing "all" as parameter, like this:

    $("#your-editor").markdown({
        onShow: function (e) {
            e.hideButtons("all");
        }
    })

If you want the whole toolbar to be hidden, you could also remove it:

    $("#your-editor").markdown({
        onShow: function (e) {
            $(".btn-toolbar").remove();
        }
    })

_Beware if no other elements are using this class, for example if you have two editors._

jacoborus commented 8 years ago

@AlissonRS I'm not interested at all in this feature

AlissonRS commented 8 years ago

@jacoborus Oh, I just marked the wrong person, I'm sorry, I'm gonna edit my post.

jacoborus commented 8 years ago

:+1: