Creating a wiki format with flexifilter
public
group: Wiki
cwgordon7@drupal.org - Mon, 2008-01-14 02:05
Following the release of the Flexifilter module, I thought I'd mention how this can be used to create a mediawiki-style markup format— and it's completely customizable in that any features can be omitted, altered, or added.
- Prepend with </nowiki>.
- Append with <nowiki>
- Do a chunk grab on </nowiki> and <nowiki>.
- Add several pattern-based text replace components:
- Replace ''' (three single dashes) with alternating <strong> and </strong>.
- Replace '' (two single dashes) with alternating <em> and </em>.
- Replace ==== (four equals signs) with alternating <h4> and </h4>
- Replace === (three equals signs) with alternating <h3> and </h3>
- Replace == (two equals signs) with alternating <h2> and </h2>
- Create a chunk grabber on [[ and ]].
- Add an IF component within the chunk grabber.
1. Add the condition "text contains" with the parameter |.
2. As subcomponents of this IF statement, prepend with <a href="/drupalwikipath/
3. String replace | with ">.
4. Append </a>. - Now, outside the if statement, create an IF NOT statement with the same condition.
1. String replace ~ with \~ (escape the character).
2. Append ~~.
3. Add an advanced append. Step 20 should be added to this component.
4. String replace ~~ with </a>.
5. Now, outside of the advanced append, prepend with <a href="/drupalwikipath/
6. String replace ~~ with ">
7. String replace \~ with ~.
- Add an IF component within the chunk grabber.
Sitewide tags: flexifilter · wiki

