Change editor init to a function

This loads the editor initialization in to a function and then calls that function with (document).ready(function().   This allows the editor to be removed / added on a textbox area by an addon.  I needed this capability for the SP port and it seemed like a good idea.