Krule이 제공하는 대답이 효과가 있지만 유용성 문제가 있습니다. 클릭하면 커서가 편집 가능 영역의 시작 부분에 항상 나타납니다. 이렇게하면 마우스로 텍스트를 선택할 수 없습니다. 텍스트 영역으로 이동하는 유일한 방법은 화살표 키를 사용하는 것입니다. 나는 이것이 받아 들일 수 있다고 생각하지 않는다.
<style>
.positionable {
position:absolute;
width:400px; height:200px;
}
.drag_handle {
position:absolute;
top:-8px; left:-8px;
background-color:#FFF; color:#000;
width:14px; height:14px;
cursor:move;
font-size:14px; line-height:14px;
font-weight:bold;
text-align:center;
border:1px solid #000;
}
.editable {
outline:none;
width:100%; height:100%;
}
</style>
<div class="positionable">
<div class="drag_handle">+</div>
<div class="editable" contentEditable="TRUE">type here...</div>
</div>
<script>
$('.positionable').draggable({handle: '.drag_handle'});
</script>
사용하는 편집 가능한 플러그인 후 '취소'
HTML을 offical 한 API를 사용할 수 있습니까? – Vivek
플러그인이 아닙니다. contenteditable은 HTML5 속성입니다. – Tommy