fix: save content html while updating
This commit is contained in:
parent
f729e7d530
commit
02ab7b7f16
@ -52,6 +52,7 @@
|
|||||||
v-model="currentNote.title"
|
v-model="currentNote.title"
|
||||||
/>
|
/>
|
||||||
<TextEditor
|
<TextEditor
|
||||||
|
ref="content"
|
||||||
editor-class="!prose-sm max-w-none p-2 overflow-auto focus:outline-none"
|
editor-class="!prose-sm max-w-none p-2 overflow-auto focus:outline-none"
|
||||||
:bubbleMenu="true"
|
:bubbleMenu="true"
|
||||||
:content="currentNote.content"
|
:content="currentNote.content"
|
||||||
@ -87,6 +88,7 @@ const list = {
|
|||||||
const showNoteModal = ref(false)
|
const showNoteModal = ref(false)
|
||||||
const currentNote = ref(null)
|
const currentNote = ref(null)
|
||||||
const oldNote = ref(null)
|
const oldNote = ref(null)
|
||||||
|
const content = ref(null)
|
||||||
|
|
||||||
const notes = createListResource({
|
const notes = createListResource({
|
||||||
type: 'list',
|
type: 'list',
|
||||||
@ -113,6 +115,7 @@ async function updateNote() {
|
|||||||
) {
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
currentNote.value.content = content.value?.editor.getHTML()
|
||||||
let d = await call('frappe.client.set_value', {
|
let d = await call('frappe.client.set_value', {
|
||||||
doctype: 'CRM Note',
|
doctype: 'CRM Note',
|
||||||
name: currentNote.value.name,
|
name: currentNote.value.name,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user