Skip to main content

Wagtail text colour picker for DraftJS, with support for Wagtail > 5.2

Project description

Wagtail Colour Picker

A colour picker for Wagtail's DraftJS editor. Original repo Forked repo

Installation

pip install wagtailrichtextcolourpicker

Setup

Add colorfield and wagtailcolourpicker to INSTALLED_APPS in your settings. Ensure this is added after you have added all other django/wagtail modules.

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

Settings

Picker icon setting

WAGTAILCOLOURPICKER_ICON = ['...']

Use an icon name from the wagtail registered icon list or register your own icon with hooks

Models

To add a color, go to Snippets -> Color

image info

All added colors are then registered to the richtext features.

Screenshots

.. figure:: http://wagtailcolourpicker.readthedocs.io/en/latest/_images/screen_1.png :width: 728 px

Picker

image info

Selected Text

image info

Example app

  • Clone the repo

    git clone https://github.com/A-Amen/asdmenon-wagtailcolourpicker.git
    
  • Install dependencies

    pip install -r requirements.txt'
    
  • Migrate

    python manage.py migrate
    
  • Create a superuser

     python manage.py createsuperuser
    
  • Then runserver.

    python manage.py runserver
    

Go to http://127.0.0.1:8000/admin and add a new Basic page to test your changes.

Example site with docker

Clone the repo

git clone https://github.com/A-Amen/asdmenon-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/admin and add a new basic page

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtailrichtextcolourpicker-0.1.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtailrichtextcolourpicker-0.1.3-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file wagtailrichtextcolourpicker-0.1.3.tar.gz.

File metadata

File hashes

Hashes for wagtailrichtextcolourpicker-0.1.3.tar.gz
Algorithm Hash digest
SHA256 493e0698e2894612b135b5fb1c298b858d0ac95a49a08b4d1d272485a064b659
MD5 c08d94d1192d3c4778c8b9d93bb77fa5
BLAKE2b-256 ed135eee3caf86ad9472cf436b26e70426382ac868ff074cdbc28aa52b3405ec

See more details on using hashes here.

File details

Details for the file wagtailrichtextcolourpicker-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtailrichtextcolourpicker-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 68f5f1c0015d940c7937c6b1d00bba8064ced7b44f3fcb654465e2dc1b7aa7bc
MD5 ac0ef90b3815f742e726a5fc998cd856
BLAKE2b-256 9bd3a2ac042f66dc784743b5b6ce06eef4425dbd0b035a490c297132da8587c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page