Thread:Extension talk:WYSIWYG/Event fired when switching to/from wikitext view ?/reply

There are some before* events available too, but I guess they will not help.

toHtml + listener event sound promising based on its description. What about this: , where ZZZ= 1...4 ?

I do not fully understand the logic of mode changes :-) ... when I applied "read-only" mode when changing modes I noticed that in source ->wysiwyg direction it is running plugin.js->toHtml procedure three times. I was then wondering if texttransform plugin has something to do with this but I did not try to disable it.