Metadata-Version: 2.1
Name: django-ckeditor-5
Version: 0.0.1
Summary: CKEditor 5 for django.
Home-page: https://github.com/hvlads/django-ckeditor-5
Author: Vladislav Khoboko
Author-email: vladislah@gmail.com
License: BSD License
Description: Django CKEditor 5 
        ==================
        
           CKEditor 5 for Django >= 2.0
        
        Quick start
        -----------
        
        1. Add "django_ckeditor_5" to your INSTALLED_APPS setting like this:
        
         .. code-block:: python
        
                INSTALLED_APPS = [
                    ...
                    'django_ckeditor_5',
                ]
        
        
        2. Include the app URLconf in your project urls.py like this:
         
          .. code-block:: python
        
               urlpatterns += [ 
                   path("ckeditor5/", include('django_ckeditor_5.urls')),
               ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
            
            
        3. Add to your settings.py:
        
          .. code-block:: python
        
              STATIC_URL = '/static/'
              MEDIA_URL = '/media/'
              MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
        
        
        
              CKEDITOR_5_CUSTOM_CSS = 'path_to.css' # optional
              CKEDITOR_5_CONFIGS = { 
                'default': {
                    'toolbar': ['heading', '|', 'bold', 'italic', 'link',
                                'bulletedList', 'numberedList', 'blockQuote', 'imageUpload', ],
            
                },
                'extends': {
                    'blockToolbar': [
                        'paragraph', 'heading1', 'heading2', 'heading3',
                        '|',
                        'bulletedList', 'numberedList',
                        '|',
                        'blockQuote', 'imageUpload'
                    ],
                    'toolbar': ['heading', '|', 'outdent', 'indent', '|', 'bold', 'italic', 'link', 'underline', 'strikethrough',
                    'code','subscript', 'superscript', 'highlight', '|',
                                'bulletedList', 'numberedList', 'todoList', '|',  'blockQuote', 'imageUpload', '|',
                                'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'mediaEmbed', 'removeFormat',
                                'insertTable',],
                    'image': {
                        'toolbar': ['imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full',
                                    'imageStyle:alignRight', 'imageStyle:alignCenter', 'imageStyle:side',  '|'],
                        'styles': [
                            'full',
                            'side',
                            'alignLeft',
                            'alignRight',
                            'alignCenter',
                        ]
            
                    },
                    'table': {
                        'contentToolbar': [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
                    },
                    'heading' : {
                        'options': [
                            { 'model': 'paragraph', 'title': 'Paragraph', 'class': 'ck-heading_paragraph' },
                            { 'model': 'heading1', 'view': 'h1', 'title': 'Heading 1', 'class': 'ck-heading_heading1' },
                            { 'model': 'heading2', 'view': 'h2', 'title': 'Heading 2', 'class': 'ck-heading_heading2' },
                            { 'model': 'heading3', 'view': 'h3', 'title': 'Heading 3', 'class': 'ck-heading_heading3' }
                        ]
                    }
                }
            }
        
        
        
        4. Add to your `models.py`:
        
          .. code-block:: python
        
        
                from django.db import models
                from django_ckeditor_5.fields import CKEditor5Field
                
                
                class Article(models.Model):
                
                    title=models.CharField('Title', max_length=200),
                    text=CKEditor5Field('Text', config_name='extends'),
        
        
        Rebuild CKEditor:
        
        * Copy django_ckeditor_5 folder in your root project folder
        * cd django_ckeditor_5
        * npm install
        * npm run build or npm run prod
        
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Description-Content-Type: text/x-rst
