Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preview button not working of toopay/bootstrap-markdown

I am creating a form with symfony. One field of my form is an textarea that I want to make it look better through the use of the bootstrap-markdown. According to the documentation, I set the attribute 'data-provide' to 'markdown' as it is shown below:

{{ form_row(form.description,
            { 'attr': {'data-provide': 'markdown'} }) }}

Until this point, all the buttons of the editor are working. But the preview button is not working!

Is there any idea to solve that issue?

Is that jQuery code necessary for making the preview buttons working?

$( document ).ready(function() {
    $("#MotorsAdsCreate_description").markdown({autofocus:false,savable:false});
});

Thanks for your help;

like image 252
Amine Jallouli Avatar asked Jan 29 '14 15:01

Amine Jallouli


1 Answers

I found the solution.

You just need to add the following js files.

  • to-markdown.js
  • markdown.js

The documentation did not mention to add these files explicitly!

Hope this would help...

like image 153
Amine Jallouli Avatar answered Nov 12 '22 10:11

Amine Jallouli