Is there a to put text before the cursor pointer into a state?

I have a text generation app and wish to put the 1000 characters above the cursor pointer into a text. Is that possible?

Hey @rcdcanlas :wave:

Good question! Are you looking to take all the text above the cursor? Or, just the first 1000 characters? If the first 1000 characters in general, you could take the multiline’s input:truncated-to 1000 as the value of the state.

If you’re looking for something more dynamic based on the cursor, you might be able to reference the post I shared in your other form post as a starting point for reference the cursor location and the text before it.

Don’t hesitate to reach out with any questions to

This topic was automatically closed after 70 days. New replies are no longer allowed.