Skip to content

ayman-makki/wagtailcolourpicker

 
 

Repository files navigation

Wagtail Colour Picker

A colour picker for Wagtail's DraftJS editor.

Installation

pip install git+https://github.com/Vadim-Karpenko/wagtailcolourpicker.git@master

Setup

Add to installed app:

INSTALLED_APPS = [
   ...
   'wagtailcolourpicker',
   ...
]

Settings

# picker icon
WAGTAILCOLOURPICKER_ICON = ['...']
# Add your colours
WAGTAILCOLOURPICKER_COLOURS = {
   'black': '#000000',
   'white': '#ffffff'
}

Models

Add into your models.py

# Add all colors from 'wagtailcolourpicker'
# list names into your RichTextField(features=[get_list_features_name()]
body.features += get_list_colour_features_name()

Documentation

Can be found on readthedocs.

Screenshots

http://wagtailcolourpicker.readthedocs.io/en/latest/_images/screen_1.png

Picker

http://wagtailcolourpicker.readthedocs.io/en/latest/_images/screen_2.png

Selected Text

Example site with docker

Clone the repo

$ git clone https://github.com/AccentDesign/wagtailcolourpicker.git

Run the docker container

$ cd wagtailcolourpicker
$ docker-compose up

Create yourself a superuser

$ docker-compose exec app bash
$ python manage.py createsuperuser

Go to http://127.0.0.1:8000/cms and add a new basic page

About

A colour picker for Wagtail's DraftJS editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 66.4%
  • JavaScript 16.0%
  • HTML 9.3%
  • Dockerfile 2.9%
  • CSS 2.9%
  • Shell 2.5%