en.javascript.info/2-ui/4-forms-controls/2-focus-blur/3-editable-div/task.md
Ilya Kantor af0ee2a49e up
2017-03-18 14:46:13 +03:00

13 lines
311 B
Markdown

importance: 5
---
# Editable div
Create a `<div>` that turns into `<textarea>` when clicked.
The textarea allows to edit the HTML in the `<div>`.
When the user presses `key:Enter` or it looses focus, the `<textarea>` turns back into `<div>`, and its content becomes HTML in `<div>`.
[demo src="solution"]