Toopay/bootstrap-markdown 的预览按钮不起作用按钮、不起作用、Toopay、bootstrap

2023-09-06 23:49:00 作者:姐旳丗堺Ní囨懂

我正在用 symfony 创建一个表单.我的表单的一个字段是 textarea 我想通过使用 bootstrap 使它看起来更好-降价.根据文档,我将属性 'data-provide' 设置为 '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?

该 jQuery 代码是使预览按钮正常工作所必需的吗?

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

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

感谢您的帮助;

推荐答案

我找到了解决方案.

你只需要添加以下js文件.

You just need to add the following js files.

to-markdown.jsmarkdown.js

文档没有提到要明确添加这些文件!

The documentation did not mention to add these files explicitly!

希望这会有所帮助...

Hope this would help...