Skip to content
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

Merged
merged 5 commits into from
Jul 1, 2014
Merged

allow stylesheet urls to be passed to config #99

merged 5 commits into from
Jul 1, 2014

Conversation

heidid
Copy link
Contributor

@heidid heidid commented May 14, 2014

For Issue #71, so external stylesheets can also be used.
Now, one can add stylesheet: 'path/to/style.css' to the editor config, and a link tag will be appended to head

@TooTallNate
Copy link

This seems like a good idea to me, +1

@jhchen
Copy link
Member

jhchen commented May 16, 2014

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.

@heidid
Copy link
Contributor Author

heidid commented May 17, 2014

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
@jhchen
Copy link
Member

jhchen commented May 25, 2014

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.

@heidid
Copy link
Contributor Author

heidid commented May 28, 2014

Great.
I'm working on the tests now.

@jbrooksuk
Copy link

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.

@heidid
Copy link
Contributor Author

heidid commented Jun 20, 2014

Sorry for the lack of commits, became busy with other projects. You can push this, there just aren't any tests for it.

@jhchen
Copy link
Member

jhchen commented Jun 25, 2014

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?

@heidid
Copy link
Contributor Author

heidid commented Jun 27, 2014

Alright, new PR here

@jhchen jhchen merged commit 102e533 into slab:develop Jul 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants