Something similar to that is already in the core (of the development version!). As wiki.splitbrain.org is always very close to the current devel version, you can see it in action e.g. here:
http://wiki.splitbrain.org/playground:playground?do=revisions