Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
952 views
in Technique[技术] by (71.8m points)

Uncaught TypeError: Cannot read property 'Attributor' of undefined Quill parchment

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' }})

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...