How to get WebTextArea.SelectedText?

While the Desktop has a DesktopTextArea.SelectedText function, the web has no equivalent.

Is there are workaround to get WebTextArea.SelectedText?

Hi David, no, there is no event, method or property to access that at the moment.

In general, code that needs to run in the browser can be done through the Web SDK, using JavaScript or TypeScript.

That said, it’s technically possible to add it to the framework if there is enough interest. Please feel free to open a Feature Request.

I have seen in the forums JavaScript on how to set the Selection, but none on how to retrieve the Selection.

Can someone enlighten me on how to JavaScript this, before I add a Feature Request?

as you need to get something back from the browser, you need a executejavascriptsync method
and it does not exist for a web control …
the only way today is a websdk.

That would explain why I’ve had problems trying to adapt other Web-based JavaScript solutions on the forum.

https://tracker.xojo.com/xojoinc/xojo/-/issues/77317