Steve Bennett wrote:
You're belittling the value of such a project by suggesting it would only be useful for those "unable" to cope with wiki syntax. I have no problems with it, but I suspect I would be faster editing directly with word, being able to select text, press ctrl+b to bold/unbold etc. But god, can we please not turn this discussion into an argument on the value of WYSIWYG in general? There are those who like it, and those who don't. So long as those who like it do not impinge upon those who don't (by forcing it on them, reformatting whole articles etc) and as long as there is someone willing to develop such a thing, there should not be a problem.
While I actually like the idea of your macro script, I'm worried that any WYSIWYG-style project /would/ impinge on those wouldn't prefer to use it. From the fun I've had with TinyMCE and FrontPage, it seems that WYSIWYG editors have a knack for reformatting entire documents. As far as TinyMCE is concerned, that editor actually reduces its posts down to a single, incredibly lengthy line of code by removing all linebreaks.
Hasn't Wikipedia seen edit wars where users have converted whole articles to fit a certain footnote templating scheme? Imagine if that were done to all but the most basic aspects of an article's source code. One consequence would be that diffs would quickly become useless as every line of an article's source is automatically changed in some way. I'd imagine that a macro like the one you're proposing would be more suitable for a company's internal MediaWiki installation, where the underlying page source wouldn't matter so much to people.
I'm not familiar with Word's macro language, but for some inspiration, you may want to take a look at Parser.php http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Parser.php?view=log, which contains the functions that convert wikitext into XHTML.