A colour picker for Wagtail's DraftJS editor.
pip install git+https://github.com/Vadim-Karpenko/wagtailcolourpicker.git@master
Add to installed app:
INSTALLED_APPS = [
...
'wagtailcolourpicker',
...
]
# picker icon
WAGTAILCOLOURPICKER_ICON = ['...']
# Add your colours
WAGTAILCOLOURPICKER_COLOURS = {
'black': '#000000',
'white': '#ffffff'
}
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()
Can be found on readthedocs.
Picker
Selected Text
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