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

Support for colours #3

Merged
merged 1 commit into from
Apr 17, 2015
Merged

Support for colours #3

merged 1 commit into from
Apr 17, 2015

Conversation

chrismcv
Copy link
Contributor

Hey,
Added support for colours - though there might be a good case for defaulting this based on the control type (if items is null).

Also changed render item to use a switch, as it was becoming a little repetitive.

Thanks,
Chris

colors = ["rgb(0, 0, 0)", "rgb(230, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 138, 0)", "rgb(0, 102, 204)", "rgb(153, 51, 255)", "rgb(255, 255, 255)", "rgb(250, 204, 204)", "rgb(255, 235, 204)", "rgb(255, 255, 204)", "rgb(204, 232, 204)", "rgb(204, 224, 245)", "rgb(235, 214, 255)", "rgb(187, 187, 187)", "rgb(240, 102, 102)", "rgb(255, 194, 102)", "rgb(255, 255, 102)", "rgb(102, 185, 102)", "rgb(102, 163, 224)", "rgb(194, 133, 255)", "rgb(136, 136, 136)", "rgb(161, 0, 0)", "rgb(178, 107, 0)", "rgb(178, 178, 0)", "rgb(0, 97, 0)", "rgb(0, 71, 178)", "rgb(107, 36, 178)", "rgb(68, 68, 68)", "rgb(92, 0, 0)", "rgb(102, 61, 0)", "rgb(102, 102, 0)", "rgb(0, 55, 0)", "rgb(0, 41, 102)", "rgb(61, 20, 102)"]
colors = colors.map (c) -> value:c

then

{ label:'Text', type:'group', items: [
    { type:'bold', label:'Bold' },
    { type:'italic', label:'Italic' },
    { type:'strike', label:'Strike' },
    { type:'underline', label:'Underline' },
    { type:'link', label:'Link' }
    { type:'background', label:'Background Colour', items:colors} 
    { type:'color', label:'Colour', items:colors}
  ]},

zenoamaro added a commit that referenced this pull request Apr 17, 2015
@zenoamaro zenoamaro merged commit 5797bb4 into zenoamaro:master Apr 17, 2015
@zenoamaro
Copy link
Owner

Thanks!

Yeah, I think enabling the color palette by default is a good idea (or at least, people would expect that).

I've been meaning to add that so thanks a lot!

zenoamaro pushed a commit that referenced this pull request Sep 20, 2016
Upgrade to Quill version 1.0.0-Beta.4
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.

2 participants