Add textarea widget spell check setting (#627)

This commit is contained in:
Chenlei Hu
2024-08-25 10:22:36 -04:00
committed by GitHub
parent b863c11e67
commit a1e40b14c7
4 changed files with 29 additions and 4 deletions

View File

@@ -83,6 +83,18 @@ watchEffect(() => {
)
})
watchEffect(() => {
const spellcheckEnabled = settingStore.get('Comfy.TextareaWidget.Spellcheck')
const textareas = document.querySelectorAll('textarea.comfy-multiline-input')
textareas.forEach((textarea: HTMLTextAreaElement) => {
textarea.spellcheck = spellcheckEnabled
// Force recheck to ensure visual update
textarea.focus()
textarea.blur()
})
})
let dropTargetCleanup = () => {}
onMounted(async () => {