|
AlignText<< | Cookbook-V1 | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalAdding the ability to align text right or to center it. Also add underline possibility. SolutionMarkup text according to... --_Align text to the right--_ DiscussionAdd the following to local.php $InlineReplacements["/__(.*?)__/"] ="<span style='text-decoration:underline'>\$1</span>"; $InlineReplacements["/--_(.*?)--_/"] ="<div align='right'>\$1</div>"; $InlineReplacements["/-_-(.*?)-_-/"] ="<div align='center'>\$1</div>"; Comments & BugsWorks with PmWiki > 0.5.24 and 0.6.0 2004-03-05 - First - thanks for doing this - I have needed a centering and underline capability. What seems to be a little better, and is in keeping with the other proposed markups, might be something like: -__underlined stuff__- The regular expression is then: /-__(.*?)__-/. Also, take a look at the mailing list thread starting at http://pmichaud.com/pipermail/pmwiki-users_pmichaud.com/2003-August/001282.html for a discussion of underline (and bold and italic) patterns. Finally, as of PmWiki 0.6.9 you can now write
pmwiki-2.2.38 -- Last modified by {{Pm}}
|