#149: Improved Markup Support
Creating a mechanism for adding support for additional markup languages such as Markdown and Textile for TextField fields and a site-wide policy for defining available and default formats.
- Proposed by
- Tom Lazar
- Seconded by
- Alexander Limi
- Proposal type
- User interface, Architecture, Process
- Assigned to release
- Repository branch
There's currently no way of setting the policy of what markup types are available in the site.
Two things should be possible:
- Selecting available markup types
- Selecting the default format
Preferrably, this should be available on a per-type basis, but even global selection is sufficient if per-type is too much work.
Ideally, this selection would be in the general types control panel, along with the workflow stuff and discussion on/off etc.
In addition, Markdown rocks and we want it ;-)
- Markdownsupport depends on the python markdown module i.e. available here. (needs to be copied into site-packages).
- Textile support depends on PyTextile, available here (uses setup.py)
- Create an example PortalTransformation for Markdown (following optilude's tutorial)
- Create site_properties for storing the default content type and a blacklist of undesired content types
- Modify Archetypes (specifically TextField class in Fields.py) and ATCT to honor those properties
- Create a UI for setting default type and allowed types in 'Portal Settings'.
by default both markdown and textile treat inline HTML 'as is' and leave it alone. for our use-case this is not acceptable. therefore we still need to implement some sort of tidying (or preferably just escaping) of any HTML that's entered.
- 2006-04-25 Research and Discussion, especially with Benjamin Saller and Martin Aspeli
- 2006-04-26 first 'vertical prototype' on separate branches for ATContentTypes, PortalTransforms and MimetypesRegistry.
- 2006-09-12 picked up development at the St.-Augustin-Sprint. Cut new branches for the Products mentioned above and created initial version of the review bundle.
- 2006-09-13 migrated the old changes of ATContentTypes, PortalTransforms and MimetypesRegistry to the new branches.
Added necessary site properties in CMFPlone's default profile plus migration and test of those migrations.
Added tests for the merged util methods in Archetypes. Implemented necessary changes to Archetype's Field.py and the template that renders the format selection widget.
- 2006-09-14 Debugged yesterday's tests using ATSiteTestCase and ATDocument instead of Archetypes Dummy types, since they broke the tests. Performed additional clicktests in demo instance without encountering any errors ;-)
- 2006-09-15 Added control panel, migration, migration tests. Some minor refactoring in Archetypes.utils, general cleanup and submitted the bundle for review.