I’ve been working on a new project for Inspire Digital.
The project is going to allow site members to produce their own content.
Members have a WYSIWYG editor (using jquery.wysiwyg) for creating content with some basic HTML. I wanted to come up with a way for only those who need the files to download the files.
Previously in this sort of situation I have simply included the script and css files within the form, but this is not valid HTML.
The only gotcha I found was that calling $(“.wysiwyg_editor”).wysiwyg(); would occasionally error with an undefined method unless I put a momentary timeout in before calling. I think this was the result of the browser making the call while still interpreting the freshly loaded script.