Reputation: 10917
I using quill parchement with laravel but i am getting cannot read property 'attributor'
my code:
let Align = new Parchment.Attributor.Class('align', 'blot-align');
Parchment.register(Align)
let node = document.createElement('div');
Align.add(node, 'right');
ref ink https://github.com/quilljs/parchment#class-attributor
error that i face:
Uncaught TypeError: Cannot read property 'Attributor' of undefined
detailed Error
Uncaught TypeError: Cannot read property 'Attributor' of undefined
at Module../resources/js/core/editor/wygsiwyg.js (app.js:234074)
at __webpack_require__ (app.js:20)
at Module../node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/index.vue?vue&type=script&lang=js& (app.js:34862)
at __webpack_require__ (app.js:20)
at Module../resources/js/index.vue?vue&type=script&lang=js& (app.js:235398)
at __webpack_require__ (app.js:20)
at Module../resources/js/index.vue (app.js:235360)
at __webpack_require__ (app.js:20)
at Module../resources/js/app.js (app.js:228035)
at __webpack_require__ (app.js:20)
i also tried webpack :
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.version();
mix.webpackConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, '../node_modules/parchment/src/parchment.js')
}
},
node: { fs: 'empty' }})
Upvotes: 2
Views: 660