From: Reini U. <rei...@gm...> - 2005-10-13 06:53:03
|
I would say, users should use RawHtml or write their own simple plugin to allow that. But generally I would like to add some kind of MarkupPlugin. As in mediawiki, where you can register new simple or extended transformati= ons. As I did with the %color=3D%% and {{template}} syntax recently. ENABLE_MARKUP_COLOR ENABLE_MARKUP_TEMPLATE See lib/InlineParser.php The only administrative problem would be to define a container (ini-like fi= le) with a list of additional Syntax plugins. And maybe another subdir. Or maybe it's enough to define ENABLE_MARKUP_CLASS (uppercase) and search for Markup_class.php (lowercase) in a special dir, which defines= the markup extension class Markup_class extends BalancedMarkup /* or SimpleMarkup */ (lowercase) IniConfig could then preg_match ENABLE_MARKUP_* or DISABLE_MARKUP_*, optionally look for the MarkupPlugin in the markup subdir, and fix the $markup_types =3D array('escape', 'bracketlink', 'url', 'interwiki', 'wikiword', 'linebreak', 'old_emphasis', 'nestled_emphasis', 'html_emphasis', 'html_abbr', 'plugin', 'isonumchars', 'isohexchars', /*'html_entities',*/ ); in lib/InlineParser.php. I'll try that in two weeks or someone else is faster :) ENABLE_MARKUP_TEMPLATE should be renamed to ENABLE_MARKUP_TEMPLATE _PLUGIN then for consistency though. Or better rename Markup_template_plugin to Markup_template PS: Note that from this Friday on I'll be on a film festival for two weeks, and I will probably not be able to fix things or add patches to CVS. So it's up to you Joel. PPS: But I'll try to find my start for the Mailer class and send it to you. It's not on my main machine. On 10/12/05, Joel Uckelman <uck...@no...> wrote: > It was suggested to me (by John Kershaw) that it would be useful to allow > users to apply class and id attributes to the markup when editing pages. > > Something like > > {{foo #bar: Here is some text of class foo with id bar.}} > > would give you a span > > <span class=3D"foo" id=3D"bar">Here is some text of class foo with id ba= r.</span> > > where the classes and ids could be defined by the site maintainer in css = as > part of the theme, or for even more neato points, the css could be pulled > from a page in the wiki so that the users could define it themselves. > > Mr. Kersahw has already hacked a very old version (1.3.0) to do something > like this. > > Questions: > > 1. Do we want to extend the markup syntax to permit this? > 2. If so, how should it be handled? As part of the basic syntax? As part > of a plugin? > > Thoughts? -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |