prevent submitting the form if inserting image or link