gouthambs/Flask-Blogging

How to change bootstrap-markdown parameters?

njourdane opened this issue · 2 comments

Bootstrap-markdown gives many options to provide in order to customize it, such as autofocus, savable, resize, etc.

The documentation says:

Beside using above data-attributes, you could call it via code $("#some-textarea").markdown({autofocus:false,savable:false})

Noted that Bootstrap-Markdown could be used as a standalone input (without any form). Set savable parameter to true will do the job. Options can be passed via data attributes or via code.

But in editor.html template, there is only {{form.text(placeholder="Blog text", required="", data_provide="markdown", rows="16")}}, without the suggested Javascript code.

So I don't really know how to change bootstrap-markdown parameters, any idea?

Can you reach out to the bootstrap-markdown community?

Finally found it.

In editor.html, we can define bootstrap-markdown parameters with html data attribute when the text-area is created, like this:

{{form.text(placeholder="Blog text", required="", data_provide="markdown", data_resize="both", rows="16")}}