I have a list of content-editable div
s on a page. I was unable to select the content of all the div
s.
As every div
is a separately editable one, as an alternative, on select and drag I want to highlight the div
s. Like the one below:
.editable {
height: 30px;
line-height: 30px;
padding: 5px;
}
<div>
<div class="editable" contenteditable="true">Block 1</div>
<div class="editable" contenteditable="true">Block 2</div>
<div class="editable" contenteditable="true">Block 3</div>
<div class="editable" contenteditable="true">Block 4</div>
</div>
Please let me know how to achieve it using jquery or javascript.