fix(tiptap): update placeholder in case of language change (#896)
This commit is contained in:
parent
886e2d6b73
commit
68d0d48199
|
@ -58,7 +58,7 @@ export function useTiptap(options: UseTiptapOptions) {
|
|||
suggestion: HashtagSuggestion,
|
||||
}),
|
||||
Placeholder.configure({
|
||||
placeholder: placeholder.value,
|
||||
placeholder: () => placeholder.value!,
|
||||
}),
|
||||
CodeBlockShiki,
|
||||
Extension.create({
|
||||
|
@ -106,6 +106,9 @@ export function useTiptap(options: UseTiptapOptions) {
|
|||
return
|
||||
editor.value?.commands.setContent(value || '', false)
|
||||
})
|
||||
watch(placeholder, () => {
|
||||
editor.value?.view.dispatch(editor.value?.state.tr)
|
||||
})
|
||||
|
||||
return {
|
||||
editor,
|
||||
|
|
Loading…
Reference in a new issue