{ "info": { "author": "Nathaniel Tucker", "author_email": "me@ntucker.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "django-aloha-edit\n=================\n\nProvides easy integration of the Aloha Editor into your Django app as well as several additional Aloha plugins.\n\nInstalling\n----------\n\n pip install django-aloha-edit\n\nUsage\n-----\n\n### HTMLField\n\nUsing the Model Field:\n\n from aloha.fields import HTMLField\n\n class MyModel(models.Model):\n content = HTMLField()\n\nThis will allow you to sanitize the output while automatically using the Aloha Widget\n\nThese settings will allow customization of the sanitizer:\n\n ALLOWED_TAGS = ['a', 'abbr', ]\n ALLOWED_ATTRIBUTES = {\n 'a' : ['href', 'rel', 'target', 'title',],\n }\n ALLOWED_STYLES = ['float','text-align','width','height',]\n ALLOWED_CLASSES = ['error', 'success', 'warning', 'info',\n ]\n IFRAME_ORIGINS = [\"http://www.youtube.com/embed/\", \"http://blip.tv/play/\"]\n\n### Widget\n\n from aloha.widgets import AlohaWidget\n\n class MyForm(forms.Form):\n content = forms.CharField(widget=AlohaWidget)\n\nBe sure to include the form media in your template somewhere and the end of the head area:\n\n {{ form.media }}\n\nNote: Specifying the widget is not necessary if you are using the HTMLField\n\n### Additional Media Dependencies\n\nAloha uses jQuery and require.js. Both should be loaded before the form media in any template you use the widget.\nYou must use the provided Aloha fork of jQuery or it will not work. Unfortunately they don't provide later versions.\n\n \n \n \n\n### Django settings file\n\nMake sure to add 'aloha' to the list of installed apps. This will allow django to find the static files when it runs\ncollectstatic.\n\n INSTALLED_APPS = (\n 'aloha',\n )\n\nExtra Plugins\n-------------\n\n### Video Embed\n\nThis plugin provides video embedding capabilities. It currently supports both blip and youtube, but other services can easily be added.\nThis plugin provides both a content handler (so you can copy/paste links) as well as UI elements in the Aloha bar to manipulate and add\nvideo embeds.\n\nFor youtube videos, the embed include a special div that will reduce load on usage. You must include /static/js/youtube.js on both the\nedit page as well as the page that shows the content. This provides a jQuery function to activate the click functionality so the\nactual video will load when a user clicks it. Make sure to call this on page load of any page you are presenting your HTML content.\n\ne.g.) $(function() {$(body).activateYoutube();});\n\n### Bootstrap UI\n\nThis plugin provides manipulation of several [bootstrap](http://twitter.github.io/bootstrap/) elements including collapse (called spoiler here)\nand thumbnails. Make sure you include the appropriate css and javascript for those parts of bootstrap or they will not work.\n\n### Usage\n\nMake sure to load the plugins in either the aloha config file or the script load specification. Use 'user/videoembed', 'user/bootstrapui'\n\nYou must also add the UI elements to the UI configuration. Below is a sample config:\n\n```javascript\nAloha = window.Aloha || {};\nAloha.settings = {\n\tsidebar : {\n\t\tdisabled : true\n\t},\n\tplugins : {\n\t\tload : [ 'common/ui', 'common/commands', 'common/format', 'common/list',\n\t\t\t\t'common/align', 'common/table', 'common/image', 'common/undo',\n\t\t\t\t'common/abbr', 'common/link', 'common/contenthandler',\n\t\t\t\t'common/paste', 'common/block', 'common/characterpicker',\n\t\t\t\t'user/videoembed', 'user/bootstrapui' ],\n\t},\n\tcontentHandler : {\n\t\tinsertHtml : [ 'word', 'blockelement', 'generic', 'sanitize',\n\t\t\t\t'videoembed', ],\n\t\tinitEditable : [ 'sanitize' ],\n\t\tgetContents : [ 'blockelement', 'basic', 'removebr', 'videoembed',\n\t\t\t\t'spoiler', 'sanitize', ],\n\t\tsanitize : 'relaxed', // relaxed, restricted, basic,\n\t\tallows : {\n\t\t\telements : [ 'a', 'abbr', 'acronym', 'b', 'blockquote', 'br', 'cite',\n\t\t\t\t\t'code', 'dd', 'del', 'div', 'dl', 'dt', 'em', 'h2', 'h3', 'h4',\n\t\t\t\t\t'h5', 'i', 'iframe', 'img', 'ins', 'li', 'ol', 'p', 'pre', 'q',\n\t\t\t\t\t'small', 'strong', 'sub', 'sup', 'table', 'td', 'th', 'tr', 'u',\n\t\t\t\t\t'ul' ],\n\n\t\t\tattributes : {\n\t\t\t\t'a' : [ 'href', 'rel', 'target', 'title', 'data-toggle', 'class' ],\n\t\t\t\t'blockquote' : [ 'cite' ],\n\t\t\t\t'q' : [ 'cite' ],\n\t\t\t\t'img' : [ 'src', 'alt', 'title', 'style' ],\n\t\t\t\t'iframe' : [ 'src', 'width', 'height', 'frameborder',\n\t\t\t\t\t\t'allowfullscreen' ],\n\t\t\t\t'div' : [ 'class', 'id', 'style', 'data-id', 'data-params' ],\n\t\t\t\t'span' : [ 'class' ],\n\t\t\t\t'p' : [ 'style' ],\n\t\t\t\t'table' : [ 'class' ],\n\t\t\t\t'td' : [ 'colspan' ],\n\t\t\t\t'th' : [ 'colspan' ],\n\t\t\t\t'ul' : [ 'class' ],\n\t\t\t\t'li' : [ 'class' ],\n\t\t\t\t'i' : [ 'class' ],\n\t\t\t\t'span' : [ 'class' ],\n\t\t\t},\n\n\t\t\tprotocols : {\n\t\t\t\t'a' : {\n\t\t\t\t\t'href' : [ 'ftp', 'http', 'https', 'mailto', '__relative__' ]\n\t\t\t\t}, // Sanitize.RELATIVE\n\t\t\t\t'blockquote' : {\n\t\t\t\t\t'cite' : [ 'http', 'https', '__relative__' ]\n\t\t\t\t},\n\t\t\t\t'q' : {\n\t\t\t\t\t'cite' : [ 'http', 'https', '__relative__' ]\n\t\t\t\t},\n\t\t\t\t'img' : {\n\t\t\t\t\t'src' : [ 'http', 'https', 'data', '__relative__' ]\n\t\t\t\t},\n\t\t\t\t'iframe' : {\n\t\t\t\t\t'src' : [ 'http', 'https', '__relative__' ]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\ttoolbar : {\n\t\ttabs : [\n\t\t\t\t{\n\t\t\t\t\tlabel : 'tab.format.label',\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'Aloha.continuoustext'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [\n\t\t\t\t\t\t\t[ 'bold', 'strong', 'italic', 'emphasis', '\\n',\n\t\t\t\t\t\t\t\t\t'subscript', 'superscript', 'strikethrough',\n\t\t\t\t\t\t\t\t\t'quote', ],\n\t\t\t\t\t\t\t[ 'formatLink', 'formatAbbr', 'formatNumeratedHeaders',\n\t\t\t\t\t\t\t\t\t'toggleDragDrop', '\\n', 'formatSpoilers',\n\t\t\t\t\t\t\t\t\t'formatThumbnail', 'addVideo', '\\n',\n\t\t\t\t\t\t\t\t\t'toggleMetaView', 'wailang',\n\t\t\t\t\t\t\t\t\t'toggleFormatlessPaste', ],\n\t\t\t\t\t\t\t[ 'alignLeft', 'alignCenter', 'alignRight',\n\t\t\t\t\t\t\t\t\t'alignJustify', '\\n', 'orderedList',\n\t\t\t\t\t\t\t\t\t'unorderedList', 'indentList', 'outdentList' ],\n\t\t\t\t\t\t\t[ 'formatBlock' ] ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel : \"tab.insert.label\",\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'Aloha.continuoustext'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [ [ \"createTable\", \"characterPicker\", \"insertLink\",\n\t\t\t\t\t\t\t\"insertImage\", \"insertAbbr\", \"insertToc\",\n\t\t\t\t\t\t\t\"insertHorizontalRule\", \"insertTag\", 'insertSpoilers',\n\t\t\t\t\t\t\t'insertVideo', 'insertThumbnail', ] ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel : \"tab.img.label\",\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'image'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [\n\t\t\t\t\t\t\t[ \"imageSource\", \"\\n\", \"imageTitle\" ],\n\t\t\t\t\t\t\t[ \"imageResizeWidth\", \"\\n\", \"imageResizeHeight\" ],\n\t\t\t\t\t\t\t[ \"imageAlignLeft\", \"imageAlignRight\", \"imageAlignNone\",\n\t\t\t\t\t\t\t\t\t\"\\n\", \"imageCropButton\", \"imageCnrReset\",\n\t\t\t\t\t\t\t\t\t\"imageCnrRatio\", ], [ \"imageBrowser\" ],\n\t\t\t\t\t\t\t[ \"wrapThumbnail\", ] ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel : \"Thumbnail\",\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'Aloha.Block.ThumbnailBlock'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [\n\t\t\t\t\t\t\t[ \"thumbnailSrc\", \"thumbnailCaption\", \"thumbnailRemove\", ],\n\t\t\t\t\t\t\t[ \"\\n\", \"thumbnailAlignLeft\", \"thumbnailAlignRight\",\n\t\t\t\t\t\t\t\t\t\"thumbnailAlignNone\" ] ]\n\t\t\t\t}, {\n\t\t\t\t\tlabel : \"Spoiler\",\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'Aloha.Block.SpoilerBlock'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [ [ \"spoilerTitle\", \"spoilerRemove\", ], ]\n\t\t\t\t}, {\n\t\t\t\t\tlabel : \"Video\",\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'Aloha.Block.VideoBlock'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [ [ \"videoSrc\", ], ]\n\t\t\t\t}, {\n\t\t\t\t\tlabel : \"YouTube\",\n\t\t\t\t\tshowOn : {\n\t\t\t\t\t\tscope : 'Aloha.Block.YoutubeBlock'\n\t\t\t\t\t},\n\t\t\t\t\tcomponents : [ [ \"videoId\", \"videoParams\", \"videoRemove\" ], ]\n\t\t\t\t}, ]\n\t},\n\tbundles : {\n\t\t// Path for custom bundle relative from require.js path\n\t\tuser : '../../js/aloha-plugins'\n\t}\n};\n```\n\nUsing Font Awesome Icons for the added plugins\n----------------------------------------------\n\nMake sure to include the following CSS to make the icons display properly.\n\n```css\n.@{fa-css-prefix} {\n font-family: FontAwesome !important;\n}\n\n.aloha .ui-icon {\n &.@{fa-css-prefix} {\n text-indent:0;\n background-image: none !important;\n } \n}\n\n```\n\nPython 3 compatibility\n----------------------\n\nPython 3 is supported using six. However, you must use the py3k fork of bleach as it is a dependency and bleach is not\npy3k compat by default.\n\nAbout Aloha Editor\n------------------\nThe [Aloha Editor](http://www.aloha-editor.org/) is a WYSIWYG that uses the\nHTML5 content-editable attribute of the browswer for the best editing experience.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ntucker/django-aloha-edit", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-aloha-edit", "package_url": "https://pypi.org/project/django-aloha-edit/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-aloha-edit/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ntucker/django-aloha-edit" }, "release_url": "https://pypi.org/project/django-aloha-edit/0.3.3/", "requires_dist": null, "requires_python": null, "summary": "Django Aloha Edit", "version": "0.3.3" }, "last_serial": 966155, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d41d8cd98f00b204e9800998ecf8427e", "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, "downloads": -1, "filename": "django-aloha-edit-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d41d8cd98f00b204e9800998ecf8427e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 0, "upload_time": "2013-07-07T18:43:47", "url": "https://files.pythonhosted.org/packages/0e/57/51c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8/django-aloha-edit-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "07257070930f5c7bdd3c4784ec61308f", "sha256": "d42b3fcf8cb7a7afa10eb9335a3796d52ffc9ab34f5b46920de45179372a1f68" }, "downloads": -1, "filename": "django-aloha-edit-0.1.1.tar.gz", "has_sig": false, "md5_digest": "07257070930f5c7bdd3c4784ec61308f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9295390, "upload_time": "2013-07-07T18:47:01", "url": "https://files.pythonhosted.org/packages/18/d7/9c9c7073f317793537fadbfa7d9081ff3a947f25ddaba6443af2109dcdaa/django-aloha-edit-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "9117bf8d5f4d308a1654774731d2c8a8", "sha256": "f89aceaab72b963cbe919e9cd9f7f16e1bbc4a3e5923fa72f7694d33b6345eae" }, "downloads": -1, "filename": "django-aloha-edit-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9117bf8d5f4d308a1654774731d2c8a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6055, "upload_time": "2013-07-15T23:51:46", "url": "https://files.pythonhosted.org/packages/27/e9/46758375603a0e936c7e4aed9db3cb0b5230b1ae5da8fc48fe415448a664/django-aloha-edit-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "672c8015d9e2f8d82f7f3a8d469363c9", "sha256": "02f99fa1bacb12a91b97ff5b0fc888b1dc1abd42fb0004ddb57dbee719a7d1f7" }, "downloads": -1, "filename": "django-aloha-edit-0.2.1.tar.gz", "has_sig": false, "md5_digest": "672c8015d9e2f8d82f7f3a8d469363c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9267229, "upload_time": "2013-07-26T17:55:53", "url": "https://files.pythonhosted.org/packages/ec/1a/87eebb48e1ae7e4b36afa4b7173f15db478569115f5ea384d84f275c1f5d/django-aloha-edit-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "3bb743191b17ae078ed48a1fcd43b3f0", "sha256": "b330e285020c4d7c04402cf5a38868459d69f8b1a81bbff3ba625e03bb63ae23" }, "downloads": -1, "filename": "django-aloha-edit-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3bb743191b17ae078ed48a1fcd43b3f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9267414, "upload_time": "2013-08-26T23:13:30", "url": "https://files.pythonhosted.org/packages/66/42/1eccb83a6f049d5907011d60d54d26128834974ced367cfb4b52dfa02cd1/django-aloha-edit-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "built for Linux-3.2.0-23-generic-x86_64-with-glibc2.7", "digests": { "md5": "79bb6ce79b32cc6101ed8eb0f65da362", "sha256": "21a8b60b4eba9198b394f4d8dd4b9d6f00c3a96284498dcb2403919a1517b975" }, "downloads": -1, "filename": "django-aloha-edit-0.3.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "79bb6ce79b32cc6101ed8eb0f65da362", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9267241, "upload_time": "2013-10-31T05:56:44", "url": "https://files.pythonhosted.org/packages/ad/21/eb075bf0918ea059c9ac3d55fc08c8eb89e5ead5ad8e076499a28e913dca/django-aloha-edit-0.3.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "b1593afb9c3be8f71fef93193d1f3d5c", "sha256": "a2154a39806c2242d29207852ec1cecdca26409fbfc8fa4c7fd3e21c03e51244" }, "downloads": -1, "filename": "django-aloha-edit-0.3.1.tar.gz", "has_sig": false, "md5_digest": "b1593afb9c3be8f71fef93193d1f3d5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9267434, "upload_time": "2013-10-31T05:56:14", "url": "https://files.pythonhosted.org/packages/6c/e2/f24b65105eb686040fb7e8721997cfa6b382b413b7775e1f40b07ef35cd5/django-aloha-edit-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "6e62d56413d13b23e50384401a9e0ec2", "sha256": "69b716b9883f45c0a4cf4a4171ede4efd8da02f8c06d7d8a22bd2a357d5b7863" }, "downloads": -1, "filename": "django-aloha-edit-0.3.2.tar.gz", "has_sig": false, "md5_digest": "6e62d56413d13b23e50384401a9e0ec2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8208959, "upload_time": "2013-11-18T02:34:23", "url": "https://files.pythonhosted.org/packages/73/4c/e13655ff8077a84e0a50bc0ccd316b574a37a6586a40528ab4f740c110e9/django-aloha-edit-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "2447bdd0fc46ac7375c70fea1f63723d", "sha256": "f8333b1c380f0c0b283fde0ba01cc62cfea13e4d2f471d166b29c0fda2cdb0c4" }, "downloads": -1, "filename": "django-aloha-edit-0.3.3.tar.gz", "has_sig": false, "md5_digest": "2447bdd0fc46ac7375c70fea1f63723d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8202320, "upload_time": "2014-01-11T17:55:50", "url": "https://files.pythonhosted.org/packages/e3/c3/952bf61819d9035c7a1a58dc49ff20d498cf32e5d5ab0c36bb85cf996d99/django-aloha-edit-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2447bdd0fc46ac7375c70fea1f63723d", "sha256": "f8333b1c380f0c0b283fde0ba01cc62cfea13e4d2f471d166b29c0fda2cdb0c4" }, "downloads": -1, "filename": "django-aloha-edit-0.3.3.tar.gz", "has_sig": false, "md5_digest": "2447bdd0fc46ac7375c70fea1f63723d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8202320, "upload_time": "2014-01-11T17:55:50", "url": "https://files.pythonhosted.org/packages/e3/c3/952bf61819d9035c7a1a58dc49ff20d498cf32e5d5ab0c36bb85cf996d99/django-aloha-edit-0.3.3.tar.gz" } ] }