GithubHelp home page GithubHelp logo

tegarimansyah / wagtail-ckeditor5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andreblackscribe/wagtail-ckeditor5

0.0 1.0 0.0 2.37 MB

Wagtail CMS CK editor plugin

Python 2.51% JavaScript 27.48% CSS 23.91% HTML 45.64% PHP 0.47%

wagtail-ckeditor5's Introduction

Wagtail CKEditor plugin

This is a Wagtail plugin, which allows CKEditor to be used as an internal editor instead of hallo.js.

How to install

Since the original owner of this project is not willing add to PYPI, so we can't install it as usual. But we can install it directly from github (this repo).

pip install git+git://github.com/tegarimansyah/wagtail-ckeditor5.git

Include wagtail_ckeditor5 in your INSTALLED_APPS.

Ensure that you have this entry in your settings.py file.

WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'default': {
        'WIDGET': 'wagtail_ckeditor5.widgets.CKEditor'
    }
}

There are several options you can add to your settings.py file.

  • Use Mathjax plugin to be able to insert mathematical formulas
WAGTAIL_CKEDITOR_USE_MATH = True
  • If above set to true you need to specify an url to Mathjax Library, defaults to:
WAGTAIL_CKEDITOR_MATHJAX_URL = getattr(settings, 'WAGTAIL_CKEDITOR_MATHJAX_URL', "//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML")
  • CKEditor settings, defaults to:
WAGTAIL_CKEDITOR_CONFIG = getattr(settings, 'WAGTAIL_CKEDITOR_CONFIG',
            {
                'language': settings.LANGUAGE_CODE,
            'toolbar': [
                {
                    'name': 'basicstyles',
                    'items': ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript']
                },
                {
                    'name': 'clipboard',
                    'items': [
                        'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
                    ]
                },
                {
                    'name': 'paragraph',
                    'items': ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-',
                            'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']},
                {
                    'name': 'links', 
                    'items': ['Link', 'Unlink', 'Anchor']
                },
                '/',
                {
                    'name': 'styles', 
                    'items': ['Styles', 'Format', 'Font', 'FontSize']
                },
                {
                    'name': 'insert',
                    'items': [
                        'Image', 'Mathjax' if WAGTAIL_CKEDITOR_USE_MATH else '-', 'Table', 'HorizontalRule', 'SpecialChar'
                    ]
                },
                {
                    'name': 'colors', 'items': ['TextColor', 'BGColor']
                },
                {
                    'name': 'document', 'items': ['Maximize', '-', 'Source']
                },
            ]
            }
        )

Inspired by:

Richard Mitchell (https://github.com/isotoma/wagtailtinymce.git)

wagtail-ckeditor5's People

Contributors

ahaywardtvuk avatar impudentem avatar tegarimansyah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.