Insert text into FluentTextField or FluentTextArea at cursor position? #3587
Answered
by
dvoituron
Stephen-Lamb
asked this question in
Q&A
-
Hi, Does anyone know if it is possible to insert text into a FluentTextField or FluentTextArea at the current cursor position, using something like the JS function setRangeText()? Or should I just use a InputText or InputTextArea component instead? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
dvoituron
Mar 27, 2025
Replies: 1 comment 1 reply
-
Yes, you can use the same JS function. The only difference is that the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Stephen-Lamb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can use the same JS function. The only difference is that the
input
element is inside a web component (so you need to use ashadowRoot
(see https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM).