Feature Request #4199
Add new function to Text helper
| Status: | Closed | Start date: | 08/12/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Core | |||
| Target version: | v3.3.0 | |||
| Resolution: | wontfix | Points: | 1 |
Description
Please add new function to Text helper class.
Its very helpful to convert special chars to XHTML tags in text (the same way as this editor do).
For example:
This feature is **very** helpful
To:
This featerue is <strong>very</strong> helpful
User should specify chars and tags to replace.
History
Updated by Dmitry T. 9 months ago
IMO, what you want is far more than just a function. It's a full library and should be at least a module, or even better to use something like http://michelf.com/projects/php-markdown/
Updated by Tomek Rychlik 9 months ago
Yes it could be a large module, but i think about basic functionality (just replace special chars with tags using preg_replace)
$replace = array ( '**' => 'strong', '__' => 'i, ) echo Text::markdown($text, $replace);
It would work well with Text::auto_p
Updated by Steven G. 9 months ago
Against.
This is like kohana supporting code highlighting and other such features. Long story short, it goes beyond what a Kohana (as a framework) should do. Creating your own markup language is also bad practice. It's bad enough there is no one true markdown language as-is, there's no need to pollute the web further.
I'm not quite sure, but I believe I read at one point about some (stupid) licensing issues regarding markdown syntax. That might be a problem as well.
Updated by Jeremy Bush 9 months ago
- Status changed from New to Closed
- Target version set to v3.3.0
- Resolution set to wontfix
Use markdown.