Difference between revisions of "StripMarkup extension"

From FollowTheScore
Jump to: navigation, search
(New page: 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 * wi...)
 
m (Reverted edits by 159.145.15.101 (Talk); changed back to last version by Gero)
 
(4 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
* this is a list
+
* with a [[Main Page]] hyperlink
* with a [[Main Page]] hyperlink
+
</nowiki></pre>
 
 
 
would normally look like this:
 
would normally look like this:
  
Line 24: Line 23:
 
{{#stripmarkup:
 
{{#stripmarkup:
 
* this is a list
 
* this is a list
* with a [[Main Page]] hyperlink
+
* with a [[Main Page|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'.

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:

but would look like this, if it were placed between 'stripmarkup' tags:

<stripmarkup>

</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'.