Wish I could help with the actual visual editor you are working with, but alas no experience doing that, just happened upon the article above yesterday while working on another project. Hope it lends some ideas