Check this out:
Nuke Tools
You can creat block and modules using HTML of Javascript and it will generate it into a PHP block or script. Depending on which tool you choose. Let me know if I misinterpreted what you were talking about or not. I hope this helps.[/url]