arabsight/aurelia-quill-plugin

Include webpack manual in readme.md

Closed this issue · 4 comments

In case of webpack user should:
Add following lines into webpack.config.vendor.js

module.exports = ({ prod } = {}) => {
    const isDevBuild = !prod;
    return [{
...
    entry: {
        vendor: {
....
            'quill',
            'quill/dist/quill.snow.css',
            'aurelia-quill-plugin/dist/amd/'
        }
    }, 
...
    }]
...
};

register plugin

aurelia.use.plugin('aurelia-quill-plugin');

But user user shouldn't import quill.snow.css he/she have to only use quill-editor tag.

will do thanks.

@szogun1987 I just tried with aurelia-cli (webpack) all you have to do is:

// this is how the new webpack plugin works unless you're using the old version i guess
aurelia.use.plugin(PLATFORM.moduleName('aurelia-quill-plugin'));

and import the css:

import 'quill/dist/quill.snow.css';

or

<require from="quill/dist/quill.snow.css"></require>

the user have to load the css because there's two themes and he has to choose which one to use.

please let me know if I'm missing something.
thanks.

About aurelia.use Of course. Sorry, I have copied it from original readme.md instead of from my code.

If I add
<require from="quill/dist/quill.snow.css"></require> to my code I receive this error probably css cannot be loaded both via vendor.config and require/import. I have choose first option.