{ "info": { "author": "Souheil Chelfouh", "author_email": "trollfot@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Zope3", "Intended Audience :: Other Audience", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "=====================\ndolmen.widget.tinymce\n=====================\n\n`dolmen.widget.tinymce` is a package that provides a useable and\npluggable way to render a text field as a WYSIWG editor in a\n`zeam.form` Form.\n\nExample\n=======\n\nWe are going to develop here a small example, to demonstrate the use\nof `dolmen.widget.tinymce`. First, we need to create a model content with\na text field::\n\n >>> import grokcore.component as grok\n >>> from zope.interface import Interface\n >>> from zope.schema import Text\n >>> from zope.schema.fieldproperty import FieldProperty\n\n >>> class ICave(Interface):\n ... paintings = Text(title=u'Description of the cave paintings')\n\n >>> class Grotto(grok.Context):\n ... paintings = FieldProperty(ICave['paintings'])\n\nWe have now a model that defines a text field. We want to edit/view\nthis content, using a rich editor, allowing to input rich text and to\ndisplay it as valid HTML. To do so, we define a form:\n\n >>> from zeam.form.ztk import Form, Fields\n\n >>> class EditCave(Form):\n ... grok.name('edit')\n ... grok.context(ICave)\n ... ignoreContent = False\n ... fields = Fields(ICave)\n\n >>> grok.testing.grok_component('edit', EditCave)\n True\n\nAt this point, if we instanciate the form, we have a normal\nrendering::\n\n >>> from zope.publisher.browser import TestRequest\n\n >>> homecave = Grotto()\n >>> request = TestRequest()\n\n >>> form = EditCave(homecave, request)\n >>> form.updateWidgets()\n \n >>> print form.fieldWidgets.get('form.field.paintings').render() \n \n\nTo get the tinyMCE widget, you simply need to use the \"mode\" of the\nfield, to indicate what you want to render::\n\n >>> from dolmen.widget.tinymce import TINYMCE_INPUT\n\n >>> form = EditCave(homecave, request)\n >>> form.fields['paintings'].mode = TINYMCE_INPUT\n >>> form.updateWidgets()\n\n >>> print form.fieldWidgets.get('form.field.paintings').render()\n \n \n\nThe modes can be 'tinymce.input' for an input widget and\n'tinymce.display' to display the value as valid html::\n\n >>> from dolmen.widget.tinymce import TINYMCE_DISPLAY\n >>> homecave.paintings = u\"

Very nice paintings

Mammoth

\"\n \n >>> form = EditCave(homecave, request)\n >>> form.fields['paintings'].mode = TINYMCE_DISPLAY\n >>> form.updateWidgets()\n\n >>> print form.fieldWidgets.get('form.field.paintings').render()\n

Very nice paintings

Mammoth

\n\n\nChangelog\n=========\n\n1.0b3 (2011-01-18)\n------------------\n\n* Corrected entry points and inclusion path.\n\n\n1.0b2 (2011-01-13)\n------------------\n\n* Now we're using ``fanstatic``.\n\n\n1.0b1 (2010-07-06)\n------------------\n\n* Tuned the menus of the TinyMCE widget, in order to removed useless\n options.\n\n* The package is now using the latest changes in the ``zeam.form``\n core, such as the ModeMarker, in order to get sane mode definitions.\n\n\n1.0a1 (2010-06-06)\n------------------\n\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://gitweb.dolmen-project.org/", "keywords": "Grok Zope3 CMS Dolmen", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "dolmen.widget.tinymce", "package_url": "https://pypi.org/project/dolmen.widget.tinymce/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dolmen.widget.tinymce/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://gitweb.dolmen-project.org/" }, "release_url": "https://pypi.org/project/dolmen.widget.tinymce/1.0b3/", "requires_dist": null, "requires_python": null, "summary": "A rich text widget using TinyMCE for Dolmen", "version": "1.0b3" }, "last_serial": 791343, "releases": { "1.0a1": [ { "comment_text": "", "digests": { "md5": "1c515e03789e9befe850fac3288f81d2", "sha256": "38d66d8e189970c31b80d3bd215fef31fc3b26d1ffdfdec6cdfe50c63ed3afad" }, "downloads": -1, "filename": "dolmen.widget.tinymce-1.0a1.tar.gz", "has_sig": false, "md5_digest": "1c515e03789e9befe850fac3288f81d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5115, "upload_time": "2010-06-06T19:11:39", "url": "https://files.pythonhosted.org/packages/b7/8b/0cda47272753a3fe5e422d7ff011c1e18ee01c2b03742d0bccc64c37a739/dolmen.widget.tinymce-1.0a1.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "784611214523eaeed41fa1f01db1d3fb", "sha256": "15be3dd79f0a36e05aa18e78375910e4604bbb48931119b17560f78f7f2b156d" }, "downloads": -1, "filename": "dolmen.widget.tinymce-1.0b1.tar.gz", "has_sig": false, "md5_digest": "784611214523eaeed41fa1f01db1d3fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5219, "upload_time": "2010-07-06T15:55:49", "url": "https://files.pythonhosted.org/packages/a2/5d/973fef1c523dd6a4a3600ea5fece8dbaaef7a814f7a6824cefba00e9ad78/dolmen.widget.tinymce-1.0b1.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "dd7d8bb6a3d3b9beda6f20b9a1ef96e1", "sha256": "02fb7f1a592e5967c28de38aab94728c6f1c949d25cec12ab88d01d13ed2d6d9" }, "downloads": -1, "filename": "dolmen.widget.tinymce-1.0b2.tar.gz", "has_sig": false, "md5_digest": "dd7d8bb6a3d3b9beda6f20b9a1ef96e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5442, "upload_time": "2011-01-13T16:59:26", "url": "https://files.pythonhosted.org/packages/14/b6/f5fb9a7bfa7a6d60f055981552e4e3165f96e7146514ce37f54c68793937/dolmen.widget.tinymce-1.0b2.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "80ee3648977d80959bf391826eb1e98c", "sha256": "207d112bf7a645378fa6401db9e81120ab08306aaebb906bada44edf865247d1" }, "downloads": -1, "filename": "dolmen.widget.tinymce-1.0b3.tar.gz", "has_sig": false, "md5_digest": "80ee3648977d80959bf391826eb1e98c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5494, "upload_time": "2011-01-18T19:35:05", "url": "https://files.pythonhosted.org/packages/5f/98/c0db516318c5213145357d0fb13a27cd372480a71bcb0ee2842f64ed83c8/dolmen.widget.tinymce-1.0b3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80ee3648977d80959bf391826eb1e98c", "sha256": "207d112bf7a645378fa6401db9e81120ab08306aaebb906bada44edf865247d1" }, "downloads": -1, "filename": "dolmen.widget.tinymce-1.0b3.tar.gz", "has_sig": false, "md5_digest": "80ee3648977d80959bf391826eb1e98c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5494, "upload_time": "2011-01-18T19:35:05", "url": "https://files.pythonhosted.org/packages/5f/98/c0db516318c5213145357d0fb13a27cd372480a71bcb0ee2842f64ed83c8/dolmen.widget.tinymce-1.0b3.tar.gz" } ] }