-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow stylesheet urls to be passed to config #99
Conversation
This seems like a good idea to me, +1 |
Thanks @enhdless for taking this on! I was planning on refactoring render.coffee so wanted to do that first before addressing this PR to avoid conflicts. It should also make the implementation of this cleaner and easier. I'd also prefer to not create new API endpoint and instead overload addStyles to take either and Object (as it is currently) or a String (for a stylesheet url). Also I need to put together a contributor guidelines doc but new features need to be accompanied with tests. It doesn't have to incredibly complex. In this case just something like the test for addStyles (which I should probably move to test/unit/render.coffee) should be fine. |
Alright, thanks for the feedback! I'll hold off until render.coffee is refactored. |
fix bower.json main file section index.coffee to index.js
Thanks for the patience @enhdless. I've made the changes I had in mind so feel free to get the latest code and update the implementation. Also I added a DOM.setAttributes function to aid in setting multiple attributes on a DOM node. |
Great. |
Is this something that can be pushed @enhdless? If not, I'll write it myself - it's the only thing stopping me from updating my forked version. |
Sorry for the lack of commits, became busy with other projects. You can push this, there just aren't any tests for it. |
I'll need tests for this but I can write them. Can you change this PR to the https://github.com/quilljs/quill/tree/stylesheet-url branch? |
Alright, new PR here |
For Issue #71, so external stylesheets can also be used.
Now, one can add
stylesheet: 'path/to/style.css'
to the editor config, and alink
tag will be appended tohead