mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-05 00:19:59 +00:00
fix(tiptap): update placeholder in case of language change (#896)
This commit is contained in:
parent
886e2d6b73
commit
68d0d48199
1 changed files with 4 additions and 1 deletions
|
@ -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