<html> <body> <p contenteditable="true" onbeforeeditfocus="alert('The text is prepared for editing')"> Click in this text and type some text. </p> </body> </html>