The editor usually is in a form, so the buttons should have "type=button", avoid conflicting with the form's submit.
Retry