Adam Khoury

Donate funds to show love and support

Click the button below to donate funds securely online. You can use your PayPal account or a credit card.

Your donations help free up my time to produce more content and assist in covering server costs. It's also a great way to say thanks for the content!

Application Configuration

Adam will be adding options here soon.

Div contenteditable Click Select All Text execCommand selectAll

Published :
Author :
Adam Khoury
Learn to use JavaScript to make selecting text simpler for your site users. We once again turn to execCommand() methods to easily accomplish this task. To see much more use of execCommand() try to catch the series we put out about building a JavaScript WYSIWYG rich text editor. <html> <head> <style> #div1{border:#666 1px solid; padding:10px;"} </style> </head> <body> <div id="div1" contenteditable="true" onclick="document.execCommand('selectAll',false,null)"> <p>A lot of code goes here</p> <p>Many lines of code or whatever</p> </div> </body> </html>