If I format a piece of text on a page like this:
document.execCommand('formatBlock', false, 'h1');
What do I do to remove this formatting?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I supposedocument.execCommand('removeFormat',false,false)would do it?Issuing
document.execCommand('formatBlock', false, 'div')on the<h1>-block will remove the<h1>-tag and replace it with a<div>-tag 1. Would that be viable?1 If you’re not using IE that is