[Home]WikiPatches/SizeAndColor

UseModWiki | WikiPatches | RecentChanges | Preferences

Just another patch about choosing size and color for some piece of text.

 sub CommonMarkup {
 ...
   s/\{\{(#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{3})\s+(.*?)\}\}/'<span style="color:' . $1 . '">' . $2 . '<\/span>'/gei;
   s/\{\{([0-9]+%)\s+(.*?)\}\}/'<span style="font-size:' . $1 . '">' . $2 . '<\/span>'/ge;
 ...
 }

Markup:

Examples

and its combinations, too

I hope doing well with the regexps. --JuanmaMP


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 4, 2018 3:23 pm by JuanmaMP (diff)
Search: