I found out how.
You use the contentEditable property of the DOMElement, like so
<div onClick="this.contentEditable="true";">
lorem ipsum dolor lorem ipsum dolorlorem ipsum dolor
</div>
More Related Contents:
- contenteditable, set caret at the end of the text (cross-browser)
- 5 stars and the golden 5 stars are not together (When browsing with Internet explorer)
- contenteditable change events
- Browser detection versus feature detection
- OnChange event handler for radio button (INPUT type=”radio”) doesn’t work as one value
- How is the default submit button on an HTML form determined?
- Show datalist labels but submit the actual value
- Jquery load() only working in firefox?
- Is there a way to make text unselectable on an HTML page? [duplicate]
- How to add/update an attribute to an HTML element using JavaScript?
- Prevent contenteditable adding on ENTER – Chrome
- How to make Internet Explorer emulate pointer-events:none?
- textarea character limit
- Close Current Tab
- replace innerHTML in contenteditable div
- Get caret index in contenteditable div including tags
- Enter key press behaves like a Tab in Javascript
- How to select all text in contenteditable div?
- How do I change the ID of a HTML element with JavaScript?
- How to disable elements selection and resizing in contenteditable div?
- How to detect supported video formats for the HTML5 video tag?
- Make a instead of by pressing Enter on a contenteditable
- Testing for multiple screens with javascript
- Extracting text from a contentEditable div
- Get content of span
- How to change behavior of contenteditable blocks after on enter pressed in various browsers
- Use JavaScript to intercept all document link clicks
- contenteditable div backspace and deleting text node problems
- Set cursor after span element inside contenteditable div
- Cross-browser innerText for setting values