<style>
[contenteditable] {
outline: 1px solid silver;
padding: 4px;
}
</style>
<div x-data="{ content: @entangle('description') }">
<div x-on:blur="content = $event.target.innerHTML" contenteditable onmouseup="mouseUp()" class="focus:border-0">{!! $description !!}</div>
</div>
<script>
function mouseUp()
{
if(window.getSelection().focusOffset != window.getSelection().anchorOffset){
alert(window.getSelection().anchorNode.data);
//alert(window.getSelection().anchorNode.data.substring( window.getSelection().anchorOffset,window.getSelection().extentOffset ));
}
}
</script>