kartik-v / krajee-markdown-editor

A Boostrap styled markdown editor that offers configurable toolbar, live preview, export, fullscreen mode, and more features
Other
41 stars 17 forks source link

Bootstrap compatibility 5.2.3 #11

Closed neecride closed 1 year ago

neecride commented 1 year ago

Hello, sorry for understanding i am fr

i use boostrap v5 and I generate editor

    </script>
        <script stype="text/javascript">
        $.fn.fileinputBsVersion = "5.2.3";
        $('#editor').markdownEditor({
        useTwemoji: true,
        theme: 'fa5',
        enableSplitMode: true,
        enableLivePreview: false,
        toolbarHeaderL: [
            ['undo', 'redo'],
            ['bold', 'italic','del','blockquote'],
            ['link', 'image','codeblock'],['emoji']
        ],
        toolbarFooterL: [],
        toolbarFooterR: ['mode'],
            markdownItOptions: {}
        });
    </script>

my js version jQuery v3.6.4

does not work with bootstrap js 5 forced to put version Bootstrap v4.4.1 for it to work

Capture d'écran 2023-05-01 070836

kartik-v commented 1 year ago

You are setting a wrong property. For Krajee markdown editor either set

  1. the bsVersion property of the plugin for each plugin specific config --- OR
  2. the $.fn.markdownEditorBsVersion at a global level for the page (you have wrongly set $.fn.fileinputBsVersion which is for bootstrap-fileinput plugin from Krajee and not this plugin )

Check the configuration examples.