Skip to main content
T
10d ago

Find available text runs from the JS runtime

Is there a way to dynamically access the available text runs from within the JS runtime (or elsewhere)? If I know their names beforehand, I can use getTextRunValue/setTextRunValue to read/write them. But I want to find all available text runs and expose a UI to the user to change them (based on what's available in the .riv file). Is that possible to achieve somehow?

1 reply
(edited) 9d ago

Hi this isn't something we expose on the web runtime. The underlying C++ runtime has a find API but this isn't exposed on the majority of our runtimes.

We're working on a new system called Data Binding, which will allow you to create data models in the editor and keep the data in sync at runtime. With that approach what you mention above will be much easier. We could expose the above, but we're hesitant to introduce new API that might get deprecated as a result of Data Binding being the eventual preferred workflow.