{ "info": { "author": "Dominique PERETTI", "author_email": "dperetti@lachoseinteractive.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 2.7" ], "description": "=====================\nDjango-WagtailMedium\n=====================\n\nWagtailmedium is a Medium Editor integration for the Wagtail CMS.\n\n.. image:: https://raw.githubusercontent.com/dperetti/Django-wagtailmedium/master/Documentation.codestory/data/1a179310-b817-11e6-9f99-f91930e01b01.png\n\n\n**Note**: A more detailed documentation is available in `.codestory `_ format, along with a sample project to fiddle with.\n\n\nInstall\n-------\n1. **Install from pip**::\n\n pip install django-wagtailmedium\n\n2. **Add wagtailmedium to your apps**::\n\n INSTALLED_APPS = [\n ...\n 'wagtailmedium',\n ]\n\n3. **Add a wagtailmedium widget to ``WAGTAILADMIN_RICH_TEXT_EDITORS``** (implemented by wagtail, undocumented yet)\n::\n\n WAGTAILADMIN_RICH_TEXT_EDITORS = {\n 'default': {\n 'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea'\n },\n 'medium': {\n 'WIDGET': 'wagtailmedium.rich_text.MediumRichTextArea',\n 'OPTIONS': {\n 'custom_buttons': {\n 'code': {\n 'contentDefault': 'Code',\n 'contentFA': '',\n 'tag': 'code',\n 'className': 'code', # optional\n },\n 'test': {\n 'contentDefault': 'Test',\n 'contentFA': '',\n 'tag': 'span',\n 'className': 'test', # optional\n },\n },\n 'medium': { # https://github.com/yabwe/medium-editor#options-example\n # 'buttonLabels': 'fontawesome',\n 'toolbar': {\n 'buttons': [ # https://github.com/yabwe/medium-editor#all-buttons\n 'bold', 'italic', 'underline',\n 'code',\n 'test',\n 'link',\n 'linkdoc',\n 'h2', 'h3', 'orderedlist', 'unorderedlist', 'strikethrough'\n ]\n },\n },\n },\n },\n }\n\n\n4. **Register whitelister element rules**\n\nThis wagtail `hook `_ defines which HTML elements are allowed in rich text areas.\n\n``wagtail_hooks.py``::\n\n from wagtail.wagtailcore import hooks\n from wagtail.wagtailcore.whitelist import attribute_rule, allow_without_attributes\n\n\n # http://docs.wagtail.io/en/v1.7/reference/hooks.html#construct-whitelister-element-rules\n @hooks.register('construct_whitelister_element_rules') # #7bFcf#\n def whitelister_element_rules():\n return {\n 'u': allow_without_attributes,\n 'span': attribute_rule({'class': True}),\n 'code': allow_without_attributes,\n 'blockquote': allow_without_attributes,\n }\n\n5. **Use wagtailmedium in a RichTextField of your model**\n\n``models.py``::\n\n from wagtail.wagtailcore.models import Page, StreamField, RichTextField\n\n class HomePage(Page):\n # a default, Hallo editor\n hallo = RichTextField(blank=True)\n # a medium editor\n medium = RichTextField(editor='medium', blank=True)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/dperetti/Django-wagtailmedium", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "django_wagtailmedium", "package_url": "https://pypi.org/project/django_wagtailmedium/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django_wagtailmedium/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/dperetti/Django-wagtailmedium" }, "release_url": "https://pypi.org/project/django_wagtailmedium/0.1/", "requires_dist": null, "requires_python": null, "summary": "Wagtailmedium is a Medium Editor integration for the Wagtail CMS.", "version": "0.1" }, "last_serial": 2886457, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "cd579d6a7bb8ae692549567c8f9b9d48", "sha256": "96f7130fcdfdb34c739c31737bdcd78452d4579206e07f4148fa92e24ee72421" }, "downloads": -1, "filename": "django_wagtailmedium-0.1.tar.gz", "has_sig": false, "md5_digest": "cd579d6a7bb8ae692549567c8f9b9d48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 811884, "upload_time": "2017-05-19T20:36:54", "url": "https://files.pythonhosted.org/packages/eb/b5/b97974d151bafa452610eb8bf6cb5cd365f7291062afad10cbf49b6b4742/django_wagtailmedium-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cd579d6a7bb8ae692549567c8f9b9d48", "sha256": "96f7130fcdfdb34c739c31737bdcd78452d4579206e07f4148fa92e24ee72421" }, "downloads": -1, "filename": "django_wagtailmedium-0.1.tar.gz", "has_sig": false, "md5_digest": "cd579d6a7bb8ae692549567c8f9b9d48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 811884, "upload_time": "2017-05-19T20:36:54", "url": "https://files.pythonhosted.org/packages/eb/b5/b97974d151bafa452610eb8bf6cb5cd365f7291062afad10cbf49b6b4742/django_wagtailmedium-0.1.tar.gz" } ] }