#149: Improved Markup Support
- Proposed by
- Tom Lazar
- Seconded by
- Alexander Limi
- Proposal type
- User interface, Architecture, Process
- Assigned to release
- Repository branch
- plip-149-markup-support
- State
- completed
Motivation
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 ;-)
Assumptions
- 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)
Proposal
- 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'.
Risks
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.
Progress log
- 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.
Participants
Tom Lazar
Other than HTML markups don't works
Works here
Not for me :(
Log
Problem if Markdown module not in python
By design
perhaps something for plone 3.2...
Should be coordinated with the work done on Wicked
This is another markup type (although implemented as a filter, so can work on top of all the others), so should be available in the types/format selection.