Difference between revisions of "StripMarkup extension"
From FollowTheScore
m (Reverted edits by 159.145.15.101 (Talk); changed back to last version by Gero) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
It can be used as a parser extension or as a parser function. | It can be used as a parser extension or as a parser function. | ||
− | Example: | + | Example:<pre><nowiki> |
− | + | * this is a list | |
− | + | * with a [[Main Page]] hyperlink | |
− | + | </nowiki></pre> | |
− | |||
would normally look like this: | would normally look like this: | ||
Line 28: | Line 27: | ||
Note that nothing remains from the hyperlink. | Note that nothing remains from the hyperlink. | ||
+ | |||
+ | === Possible area of usage === | ||
+ | When you create a table with DPL which shall be exported to Excel, it may be useful to strip the markup because Excel cannot deal with markup very well. You might get unwanted line breaks etc. Using ''StripMarkup'' you can at least transfer the 'plain text'. |
Latest revision as of 07:37, 27 September 2007
The StripMarkup extension removes all wiki and html markup from a portion of wikitext.
It can be used as a parser extension or as a parser function.
Example:* this is a list * with a [[Main Page]] hyperlink
would normally look like this:
- this is a list
- with a Main Page hyperlink
but would look like this, if it were placed between 'stripmarkup' tags:
<stripmarkup>
- this is a list
- with a Main Page hyperlink
</stripmarkup>
The same could be achieved with parser function syntax:
{{#stripmarkup:
- this is a list
- with a aaa hyperlink
}}
Note that nothing remains from the hyperlink.
Possible area of usage
When you create a table with DPL which shall be exported to Excel, it may be useful to strip the markup because Excel cannot deal with markup very well. You might get unwanted line breaks etc. Using StripMarkup you can at least transfer the 'plain text'.