Ngx-quill: Imported the quill module, but css does not seem to get applied

Created on 7 Mar 2018  路  14Comments  路  Source: KillerCodeMonkey/ngx-quill

image

This is how it looks for me. There are no console errors and I also tried including them in the angular-cli.json file.

Most helpful comment

You need to import the quill theme CSS and core CS on your own. Import the
CSS Files in your CSS/scss or If you are using angular+cli add them to
Styles in the angular CLI json. Or simply load them in your index.HTML.
check my demo repo for an example

put:

@import '~quill/dist/quill.core.css';
@import '~quill/dist/quill.bubble.css';
@import '~quill/dist/quill.snow.css';

at the beginning of your styles.(s)css to get the quill styles globally or only in the (s)css file of a specific component

All 14 comments

You need to import the quill theme CSS and core CS on your own. Import the
CSS Files in your CSS/scss or If you are using angular+cli add them to
Styles in the angular CLI json. Or simply load them in your index.HTML.
check my demo repo for an example

put:

@import '~quill/dist/quill.core.css';
@import '~quill/dist/quill.bubble.css';
@import '~quill/dist/quill.snow.css';

at the beginning of your styles.(s)css to get the quill styles globally or only in the (s)css file of a specific component

Just adding because this took me a sec to figure out, in case anyone else stumbles on this thread. For some reason, I missed that there's a difference between core.js and core.css

There are three files you need to include to get this fully working with angular-cli

In .angular-cli.json:

"styles": [
...
"../node_modules/quill/dist/quill.snow.css",
"../node_modules/quill/dist/quill.core.css"
...
],
"scripts": [
"../node_modules/quill/dist/quill.core.js"
],

I have imported the bubble.css but still facing the same issue.

did you checked out my example repo? there you see how to integrate quill with an angular cli projec.t it is linked in the readme

yes I did. The snow theme is working fine as expected but the bubble theme is not. I'm seeing the same ui as posted by OP.

strange because in my example it is working fine https://killercodemonkey.github.io/ngx-quill-example/ checkout the "bubble theme" editor

Check your javascript console in the browser or cli output if there is a hint, that the bubble.css is not found.

Maybe you have missed something in the path or name.

It is including the bubble.css but I must be doing something wrong since its working fine in your example. Let me check and will get back to you. Thank you

You have to include it in your global css. because if you import it only in a component all css classes are getting prefixed because of view encapsulation ;)

works fine now. I was overwriting some of the CSS in my styles.css (for snow theme) which was not letting the floating toolbar work when I changed the theme to bubble. Thank you.

no probs. glad it is working now :)

Thanks for sticking with the issue, @KillerCodeMonkey!

dasasd

dasasd

dasdasd

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bricksimpleseanmccaffery picture bricksimpleseanmccaffery  路  3Comments

bolota picture bolota  路  3Comments

pedrojrivera picture pedrojrivera  路  4Comments

yarik-vv picture yarik-vv  路  3Comments

luksireiku picture luksireiku  路  5Comments