Guidance on wrapping an existing JS control

Is there any guidance on wrapping an existing web control so it can be used in WebCore? I'm specifically thinking of the TinyMCE editor.

The best example is in our Core Source code that has plenty of example of controls wrapping existing web libraries. There are also a couple of blog posts about writing custom controls.