We should figure out a way to not have this code completely duplicated. One way would be to just have users include `jquery.wymeditor.structured_headings.js` on their site and modify that file so that it works without WYMeditor being included. You can add code to check for the existence of the WYMeditor and if it doesn't exist, just set up the variables needed by the stand-alone script and expose the function.