bgarrels / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Text filters beyond Textile and nl2br #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add the capability to install additional text filters besides the stock Textile 
and nl2br.

Allow users with sufficient privileges to select a filter/filter chain per 
article.

Plugin-friendly API (~Textfilter::register())

Bonus points: Allow publishers to define filter chains, e.g. raw text -> 
Markdown -> HTMLPurifier -> final markup. Requires UI.

Candidates: Markdown, BBCode, HTMLPurifier

Original issue reported on code.google.com by r.wetzlmayr on 5 Jun 2012 at 7:17

GoogleCodeExporter commented 9 years ago
I personally don't see need for a user interface or chaining options. If and 
when the filters are implemented by a plugin, plugin's own load order can be 
used, and things as purifying (or any other post-processing) could be done by a 
persistent hook, ran no matter what processing option is selected by the end 
user.

As the whole deal goes, as bare minimum probably needs:

* some changes to how the article markup option is stored. Instead of the 
integer use_textile, some unique identifier is probably needed. A column that 
stores a prefixed unique identifier assigned for a text filtering 
stack/callback.
* registering method that adds an extra markup options to the Write pane, and 
registers to a callback event on the current Textiling location. One that 
passes content by reference.

Persistent processing/filtering could hook to the callback event directly 
without adding options to the markup option, while registered markup processors 
appear in it.

In my opinion that should be enough to allow plugins to change the processing 
method from Textile to something else, or add additional sets.

Original comment by jukka.svahn@rahinaa.biz on 5 Jun 2012 at 8:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Related forum thread: http://forum.textpattern.com/viewtopic.php?id=38128

Original comment by r.wetzlmayr on 5 Jun 2012 at 8:37

GoogleCodeExporter commented 9 years ago

Original comment by r.wetzlmayr on 2 Aug 2012 at 6:08

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r4115.

Original comment by r.wetzlmayr on 13 Sep 2012 at 11:39