Event handlers of bbcode textboxes are now executed last

This is to allow text manipulation to work while listening to submit events. This change fixes the markdown implementation too.