{ "info": { "author": "Sam Schwartz", "author_email": "sam.schwartz@wildcardcorp.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 5.0", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==============\nuwosh.snippets\n==============\n\nAdds dynamically-updated rich text snippets to Plone. Update a \nsnippet to display the change everywhere the snippet is used \n(pages, news items, events, anywhere rich text and TinyMCE \nappear).\n\nPlone Version Compatibility\n---------------------------\n\nVersion 2.x is compatible with Plone 5.0+\n\nEarlier versions are compatible with Plone 4\n\nIntroduction\n------------\n\nThe uwosh.snippets package allows you to include dynamically updated\nrich text snippets (chunks of rich text) anywhere in your site that\nuses the TinyMCE editor (i.e., any rich text field), including\nPages, News Items, and Events.\n\nSnippets can be used anywhere that rich text can be used. They are\ninserted into a page much like you would an image or hyperlink.\n\nBecause snippets are dynamically rendered, if you edit the snippet,\nits updated rich text is shown everywhere you had inserted the\nsnippet.\n\nThis is much more efficient and less error prone than copying and\npasting rich text in multiple places in your site.\n\nExample\n-------\n\nA university wants to display its number of enrolled students\nconsistently across its web site. Instead of manually updating each\npage that mentions the number of enrolled students and having to\nremember to change each of these pages whenever the enrollment number\nchanges (e.g. annually), a content editor would create a snippet\ncalled \"Enrollment Number\" containing the rich text \"13,491 students\"\nand would insert that snippet wherever the enrollment number needed to\nbe displayed.\n\nWhenever the official enrollment number changes, the content editor\nedits the \"Enrollment Number\" snippet to update the count,\ne.g. \"14,120 students\", and saves the change. All subsequent views of\npages that contained that snippet will display the updated number.\n\nHow to use\n----------\n\n- Edit your buildout.cfg to add uwosh.snippets to your eggs.\n- Run buildout.\n- Restart your instance or clients.\n- Go to Site Setup -> Add-ons\n- Activate uwosh.snippets\n\nA new folder called \"Snippets\" (with ID \".snippets\") will be created\nat the root of your site; that is the default location where the\nadd-on will look for snippets.\n\nTo add a snippet:\n\n- Navigate to the Snippets folder.\n- Add a Page. Give it a meaningful title and summary to\n help you and other content editors locate the snippet most\n easily. In the body, enter any rich text. You can use TinyMCE's\n Tools -> Source Code (HTML) view to insert arbitrarily complex HTML,\n as long as it satisfies your site's HTML Filtering settings.\n- Click the Save button.\n\nYou have created your first snippet! You can use this snippet in one\nor more places on your site, anywhere TinyMCE is used as the editor.\n\nTo insert a snippet:\n\n- Add or edit a Page (or Event or News Item or any other content\n item that has a rich text field that uses the TinyMCE editor).\n- In the TinyMCE editor, place your cursor where you will want to have\n the snippet's rich text appear.\n- Click on TinyMCE's new \"{{}}\" toolbar icon to bring up the snippet\n search dialog, which by default looks in your site's Snippets\n folder.\n- Use the search dialog to locate the snippet you want to\n insert. Click in the search dialog's text field. You will see a list\n of all snippets in your snippets folder. If you enter text in the\n search field, you will see only the snippets that match the search\n term you entered.\n- Click on the snippet you want to insert. The Snippet Preview will\n show you the contents of the snippet you selected. Use the \"Select\n section\" drop down to choose the portion of the snippet you want to\n preview (this is useful if you have particularly long snippets).\n- Click the Insert button. A reference to the snippet (a \"plug\") will\n be inserted into the rich text at the cursor location. It will look\n something like \"Snippet:[ID=82341234bcda]\".\n- Click the Save button.\n\nInstead of seeing the snippet plug you will now see the rich text\ncontents of the snippet.\n\nSettings\n--------\n\nuwosh.snippets includes a control panel, available at Site Setup ->\nSnippets ('@@snippets-controlpanel').\n\nRelated items settings:\n\n- Use this to change the directory in which to look for snippets (by\n default, a folder with the ID `.snippets` and title `Snippets`). For\n example, to look for snippets in a folder with the ID `blabla` at\n the root of your site, change the value of `basePath` from `/.snippets` to `/blabla`.\n- You can also modify the content type you use as snippets. By\n default, this is Pages (Documents). For example, to use the rich\n text field of a News Item, change the value of `selectableTypes`\n from `[Document]` to `[News Item]`.\n\nCode display expression:\n\n- Use this to modify the way a snippet reference (\"plug\") is displayed\n inside the TinyMCE editing area. Defaults to\n `string:Snippet:[ID=${context/@@uuid}]`. This is probably not a\n setting you will want to change.\n\nRender expression:\n\n- Use this to specify the TAL expression that renders a\n snippet. Defaults to\n `context/text/output|context/getText|nothing`. This is probably not\n a setting you will want to change. See the `TAL expression\n documentation\n `_.\n\nNotes\n-----\n\nIf you want a snippet to be rendered without causing a line break\n(because of the `p` tag that TinyMCE wraps around the rich text), edit\nthe snippet and, beneath the TinyMCE rich text editing area, use the\nText drop down and choose `text/x-web-textile`. Then manually remove\nthe `p` tag around the snippet's rich text and click Save. The rich\ntext will be saved without TinyMCE re-wrapping it with the `p` tag,\nand when you use the snippet elsewhere it will not start a new\nparagraph.\n\nRequirements\n------------\n\nThe TinyMCE WYSIWYG editor needs to be installed and enabled. A basic\nunderstanding of its use is also highly recommended. For more\ninformation about TinyMCE, visit their `website\n`_.\n\n\nTODO\n----\n\n- would be nice: re-add support for add/edit/delete snippets in the modal\n- doesn't fit as well into how we're allowing snippets from anywhere on the site now\n \nCredits\n-------\n\nThe original concept was developed by Sam Schwartz for the Office of International Education at University of Wisconsin Oshkosh.\n\nPlone 5 compatibility was developed by Nathan Van Gheem / Wildcard Corp. for Philip Bauer / Starzel.de.\n\nMaintainers\n-----------\n\nThis add-on is maintained by Wildcard Corp., https://wildcardcorp.com,\ndevelopers of the Castle CMS enhanced distribution of Plone,\nhttps://castlecms.io\n\nContributors\n============\n\n\n- Sam Schwartz, Author\n- Nathan Van Gheem\n- Gil Forcada\n- T. Kim Nguyen\n\nChangelog\n=========\n\n2.0.4 (2017-08-30)\n------------------\n\n- add note about rendering snippets inline\n [tkimnguyen]\n\n\n2.0.3 (2017-08-29)\n------------------\n\n- more step by step user documentation\n [tkimnguyen]\n\n\n2.0.2 (2017-08-27)\n------------------\n\n- enhance user doc in README\n [tkimnguyen]\n\n\n2.0.1 (2017-08-27)\n------------------\n\n- fix MANIFEST to include missing marker file to enable creation of\n .snippets folder on activation\n [tkimnguyen]\n\n\n2.0.0 (2017-06-13)\n------------------\n\n- Add site setup configuration\n [vangheem]\n\n- Integrate link integrity\n [vangheem]\n\n- Be able to add any content for a snippet\n [vangheem]\n\n- Use lxml to parse doc\n [vangheem]\n\n\n0.9.29 (12/19/2014)\n-------------------\n- Users can now reenable tinyMCE after disabling it\n- Fixed issue causing the backend regex from grabbing normal\n (non-snippet) span tags\n\n0.9.27 (12/17/2014)\n-------------------\n- Added link to disable tinyMCE when creating a snippet\n\n0.9.26 (8/26/2014)\n------------------\n- Changed wording on several links/buttons to make them more understandable\n- Fixed broken preview system\n- Snippet plugs are now removed from the current page when the respective snippet is deleted.\n\n0.9.24 (8/21/2014)\n------------------\n- Changed user-role requirements for different parts of the snippet UI\n- Fixed issue causing XMLSyntaxError...for real this time.\n- UI no longer displays add/edit/delete buttons if the user lacks the permissions to use them.\n- Updated README\n- Additional robot tests\n\n0.9.2 (8/13/2014)\n-----------------\n- Re-factored and rearraged code to make it complient to Plone's JS standards\n- Made JS jslint complient\n\n0.9.18 (8/13/2014)\n------------------\n- Tweaked some of the robot tests, added a few others\n- Added exception for the XMLSyntaxError error\n- Fixed bug causing AJAX requests to be sent when they didn't need to\n\n0.9.15 (8/8/2014)\n-----------------\n- moved robot tests over from another branch\n- Changed JS on edit page load to get all snippets it needs at once, instead of one at a time\n- Reworked SnippetList class to accomodate aforementioned JS change\n\n0.9.11 (8/8/2014)\n-----------------\n- \"Remove\" button no long remains after removing a snippet plug\n- HTML View no longer breaks ALL the things.\n\n0.9.10 (8/6/2014)\n-----------------\n- Added button to allow the user to remove snippet plugs from the current page\n\n0.9.03 (8/5/2014)\n-----------------\n- Fixed bug preventing images from showing in preview window\n- Fixed bug breaking click-to-open when a snippet contains an image\n\n0.9.01 (8/5/2014)\n-----------------\n- Fixed useless uninstall profile\n\n0.8.9 (8/4/2014)\n----------------\n- Fixed small JS bug introduced in 0.8.8\n\n0.8.9b (8/4/2014)\n-----------------\n- Browser UI no longer breaks when a snippet has no desc.\n\n0.8.9a (8/4/2014)\n-----------------\n- Fixed missing .snippet folder issue...again\n- Fixed issue with tinymce icon not showing up\n\n0.8.8 (8/4/2014)\n----------------\n- Missing .snippets folder issue fixed.\n- Description field now longer required.\n- Broken click-to-open functionality now fixed.\n\n0.8.6a (6/5/2014)\n-----------------\n- Snippet ID's now aren't allowed to have any CSS-ID unsafe characters\n- Snippet plugs are now automatically updated when the base snippet is edited\n- The text inside snippet plugs can no longer be edited (that I'm aware of?)\n- Fixed numerous bugs preventing the \"Selected snippet\" box from populating\n\n0.8.5a (05/27/14)\n------------------\n- Added contenteditable tag to prevent users from editing snippets inline\n\n\n0.8.4a (05/21/14)\n------------------\n- Added snippet delete functionality\n- Added JS to polish delete\n\n\n.8.3a\n------------------\n- Fixed issue with the new regex\n\n.8.2a\n------------------\n- Remade the regex used by the snippet parser.\n\n.8a\n------------------\n- Added a Create/Edit extension to the TinyMCE plugin\n- Inumerable bug fixes I've neglected to document :(\n- Added layer to prevent premature execution\n- Reworked JS to be more flexible\n\n.3\n-------------------\n- Extended TinyMCE plugin to make snippets \"clickable\" in the edit page.\n- Added snippet browser window to TinyMCE plugin.\n- Removed support for YouTube embedding (other products handle this better).\n\n.2\n-------------------\n- Added ability to embed youtube videos.\n\n.1\n-------------------\n- Basic proof-of-concept implementation\n- Added TinyMCE plugin", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/collective/uwosh.snippets", "keywords": "snippet,dynamic,reusable,fragment", "license": "gpl", "maintainer": "", "maintainer_email": "", "name": "uwosh.snippets", "package_url": "https://pypi.org/project/uwosh.snippets/", "platform": "", "project_url": "https://pypi.org/project/uwosh.snippets/", "project_urls": { "Homepage": "https://github.com/collective/uwosh.snippets" }, "release_url": "https://pypi.org/project/uwosh.snippets/2.0.4/", "requires_dist": null, "requires_python": "", "summary": "Adds reusable dynamically-rendered rich-text snippets", "version": "2.0.4" }, "last_serial": 3135318, "releases": { "0.9.29": [ { "comment_text": "", "digests": { "md5": "40022b50b5e7715c18993024659e3533", "sha256": "497092354a2670b076ac3baf1b202c52269c360cec659bec166d67fdad5f629d" }, "downloads": -1, "filename": "uwosh.snippets-0.9.29.tar.gz", "has_sig": false, "md5_digest": "40022b50b5e7715c18993024659e3533", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1044869, "upload_time": "2014-12-19T19:38:28", "url": "https://files.pythonhosted.org/packages/dc/bd/ad2204708b51ae3d01674f7e20041bb52f61bd3d6ad550738e77a50e51f0/uwosh.snippets-0.9.29.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "3804fea35a6941023ab1870501f25404", "sha256": "89029ea875630e496838b2a8100ed3a6601ac86d79f653923321e4136576540a" }, "downloads": -1, "filename": "uwosh.snippets-2.0.0.tar.gz", "has_sig": false, "md5_digest": "3804fea35a6941023ab1870501f25404", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22877, "upload_time": "2017-06-13T19:18:47", "url": "https://files.pythonhosted.org/packages/ad/da/4b92fcc0dae4fb0a742753541f5b003710b40f7c2eb9ffe6415db7046d8a/uwosh.snippets-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "a0e127ec022bd8e22db096a556cd8aae", "sha256": "5532baa6c15936f471908b5d3337690e2725040a6c88ae9c13609e1fc49b3eec" }, "downloads": -1, "filename": "uwosh.snippets-2.0.1.tar.gz", "has_sig": false, "md5_digest": "a0e127ec022bd8e22db096a556cd8aae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30080, "upload_time": "2017-08-27T16:33:34", "url": "https://files.pythonhosted.org/packages/88/5b/cb35391ce25ddb07123d1ebe1be8adab64a95984c802dfd24880c8d1ba81/uwosh.snippets-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "02b0c29aaf9675aa84e0c1a00b302419", "sha256": "1c3a03c0ced60dbbaad38d65c55a4f6c8ae4a9320ae4475d0f2e9a9f19ceddb5" }, "downloads": -1, "filename": "uwosh.snippets-2.0.2.tar.gz", "has_sig": false, "md5_digest": "02b0c29aaf9675aa84e0c1a00b302419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32605, "upload_time": "2017-08-27T18:40:14", "url": "https://files.pythonhosted.org/packages/4d/80/e0303ebf198c5eea0779c1d2578c5eab7090ac069bc165bdb88edc57828c/uwosh.snippets-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "c6c66856687379afc2c8de823de2dbef", "sha256": "4ab68963fcbabd943426c14384f9fd9772577888901465ec17750e904d4d4ecd" }, "downloads": -1, "filename": "uwosh.snippets-2.0.3.tar.gz", "has_sig": false, "md5_digest": "c6c66856687379afc2c8de823de2dbef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34440, "upload_time": "2017-08-29T23:44:20", "url": "https://files.pythonhosted.org/packages/1c/1d/50ec80707caaaa8833f6df046f92a297ac58194ef8f1d542f86137e4e4b0/uwosh.snippets-2.0.3.tar.gz" } ], "2.0.4": [ { "comment_text": "", "digests": { "md5": "4c0a336e1fe0f6313b6b484e75ec9a93", "sha256": "6fba9b31bdf9e53a4aabc2662024db7e93f44a386f5f204d758b00e6c808137f" }, "downloads": -1, "filename": "uwosh.snippets-2.0.4.tar.gz", "has_sig": false, "md5_digest": "4c0a336e1fe0f6313b6b484e75ec9a93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34922, "upload_time": "2017-08-30T16:44:43", "url": "https://files.pythonhosted.org/packages/d3/39/9c9da006afe6aede0e9cc9b75bc55403d431dc990f1e942eb63d7b7136ab/uwosh.snippets-2.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c0a336e1fe0f6313b6b484e75ec9a93", "sha256": "6fba9b31bdf9e53a4aabc2662024db7e93f44a386f5f204d758b00e6c808137f" }, "downloads": -1, "filename": "uwosh.snippets-2.0.4.tar.gz", "has_sig": false, "md5_digest": "4c0a336e1fe0f6313b6b484e75ec9a93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34922, "upload_time": "2017-08-30T16:44:43", "url": "https://files.pythonhosted.org/packages/d3/39/9c9da006afe6aede0e9cc9b75bc55403d431dc990f1e942eb63d7b7136ab/uwosh.snippets-2.0.4.tar.gz" } ] }