Enter edit mode when double clicking
This commit is contained in:
parent
2e298ffc11
commit
9de48aa6b2
@ -67,6 +67,7 @@
|
||||
class="tiptap__editor"
|
||||
:class="{'tiptap__editor-is-edit-enabled': isEditing}"
|
||||
:editor="editor"
|
||||
@dblclick="setEditIfApplicable()"
|
||||
@click="focusIfEditing()"
|
||||
/>
|
||||
|
||||
@ -467,6 +468,13 @@ function bubbleSave() {
|
||||
}
|
||||
}
|
||||
|
||||
function setEditIfApplicable() {
|
||||
if (!isEditEnabled) return
|
||||
if (isEditing.value) return
|
||||
|
||||
setEdit()
|
||||
}
|
||||
|
||||
function setEdit(focus: boolean = true) {
|
||||
internalMode.value = 'edit'
|
||||
if (focus) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user