leiger wrote on 15 Nov 2009 02:49
This is a design sketch for "automatic code replacement", which is a technique to save users effort when typing complex wiki syntax.
The settings are configured per-site, by the site admins.
The admin supplies two values:
- Code
- Replace with
When someone saves a page or comment, their code is cross-referenced with this list. If any of the code matches what is provided in the "code" column, then it is replaced with the corresponding "replace with" code at runtime1.
For example…
The site manager setting might look like this after a few entries have been made:
Code | Replace with |
---|---|
[b] | ** |
[/b] | ** |
[youtube] | [[include youtube |video_id= |
[/youtube] | ]] |
contact us | [[[contact]]] |
This means that if someone was to type [b]Hello[/b] into the source code, it would do the same thing as **Hello** does (making the text style = bold).
Note: [b]Hello[b] and [/b]Hello[/b] would also work!
If someone were to type [youtube]_6nfVLOsj6U[/youtube], then it would convert to this: [[include youtube |video_id=_6nfVLOsj6U]] (and that included page contains code for embedding a youtube video… e.g. dimensions of the player, etc.
Wikidot Plugins | By leiger | 0 Comments | 08 Mar 2010 22:07 |
Interesting applications that may require a re-design | By soronlin | 1 Comments | 19 Mar 2010 10:56 |
I will not vote for this because | By Steven Heynderickx | 5 Comments | 26 Nov 2009 09:37 |
ChrysZ would like this as well | By leiger | 0 Comments | 26 Nov 2009 01:14 |
We discourage direct comments on this thread: to discuss it, please start a sub-thread.