gouthambs / Flask-Blogging

A Markdown Based Python Blog Engine as a Flask Extension.
http://flask-blogging.readthedocs.org/en/latest/
MIT License
692 stars 164 forks source link

How to change bootstrap-markdown parameters? #132

Closed roipoussiere closed 5 years ago

roipoussiere commented 5 years ago

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?

gouthambs commented 5 years ago

Can you reach out to the bootstrap-markdown community?

roipoussiere commented 5 years ago

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")}}