Java or JavaScript ( I'm assuming its JavaScript? Yep? )
D'you reckon you could post the code? The Java(Script) and the html for the button.
And, if you have it, a link would be great too.
I don't think you can get WYSIWYG editors which will convert to Java(Script), as its not a visible language, unlike HTML / XML, whenever it outputs something, it will output it as some form of markup. So it sounds like when you click the button, it executes JavaScript, and then this script is converts to XML ( or HTML ). That sounds more logical, however can't be sure without some code/link etc.