vue3-summernote-editor icon indicating copy to clipboard operation
vue3-summernote-editor copied to clipboard

this.elem.summernote is not a function

Open bernlorbis opened this issue 2 years ago • 4 comments

bernlorbis avatar Apr 22 '23 14:04 bernlorbis

Hi! Like you see at #1 this problem is because you are not installing jquery or summernote adequately. This component depend those installations.

Here I'm using it in all projects with laravel and vue 3, and all is good.

rafwell avatar Apr 25 '23 13:04 rafwell

I installed both jquery and summernote. Is project is running in latest Laravel and vue version? Can you share your configuration

bernlorbis avatar Apr 25 '23 14:04 bernlorbis

Here i'm using vue 3.1, laravel mix 6, jquery 3.6. In my webpack.mix.js jQuery alias is set:

mix.webpackConfig({
    resolve: {
        alias: { jQuery: path.resolve(__dirname, 'node_modules/jquery/dist/jquery.js') }
    },
    plugins: [
        // ProvidePlugin helps to recognize $ and jQuery words in code
        // And replace it with require('jquery')
        new webpack.ProvidePlugin({
            $: 'jquery',
            jQuery: 'jquery'
        })
    ]
});

in my bootstrap/index file (the file who is requiring the components, like jquery and summernote and some others):

window.$ = window.jQuery = require('jquery');

rafwell avatar Apr 25 '23 14:04 rafwell

Same problem, but I'm running my vue app in a WordPress plugin so jQuery is already loaded by default.

orizzontiholding avatar Sep 14 '23 10:09 orizzontiholding