I'm the developer of the "RefToolbar" gadget on the English Wikipedia, which adds additional functionality to the editing toolbar to add references. The script itself is at http://en.wikipedia.org/wiki/User:Mr.Z-man/refToolbar_2.0.js with some more in the /base.js subpage imported near the top.
It adds an additional section to the toolbar with a dialog for common reference templates.
I tried to integrate it as neatly as possible, though the lack of documentation hasn't helped. Everything works fine, except when using IE. In IE, it just inserts the ref in some random location on the page, sometimes *near* where the cursor/highlight is, but sometimes its not even close. It seems to work differently with different compatibility mode settings, but even that isn't consistent. I've looked at some of the WikiEditor code and can't figure out why it isn't working, when the other dialogs in the standard toolbar work just fine.
The relevant code, from the dialog object:
buttons: { 'cite-form-submit': function() { var ref = CiteTB.getRef(false, true); $j.wikiEditor.modules.toolbar.fn.doAction( $j(this).data( 'context' ), { type: 'replace', options: { pre: ref } }, $j(this) ); $j(this).dialog( 'close' ); },
Any thoughts would be appreciated.