You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
editorRef.value.runCmd('insertText', text)
gives me the runtime error editorRef.value.runCmd is not a function
Workaround (after I looked at the editorRef.value object for almost an hour in vain, I showed the whole editorRef.value object from the devtools console (many screens long) to my programmer buddy ChatGPT, he came up with the workaround solution in 0.5 seconds: editorRef.value[0].runCmd('insertText', text)
this way it works Ok, but I still have no clue, why. My q-editor has the ref element applied directly, it is not in a container that has the ref.
Sorry, my fault. My QEditor component was in a v-for block thats why there was an array of elements within the ref. It was not obvious for me ref works that way if many elements have the same ref.
Description
editorRef.value.runCmd('insertText', text)
gives me the runtime error editorRef.value.runCmd is not a function
Workaround (after I looked at the editorRef.value object for almost an hour in vain, I showed the whole editorRef.value object from the devtools console (many screens long) to my programmer buddy ChatGPT, he came up with the workaround solution in 0.5 seconds: editorRef.value[0].runCmd('insertText', text)
this way it works Ok, but I still have no clue, why. My q-editor has the ref element applied directly, it is not in a container that has the ref.
Documentation Section URL
https://quasar.dev/vue-components/editor#plaintext-pasting
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Components (quasar)
The text was updated successfully, but these errors were encountered: