Resolve relations with Storyblok Bridge

Changes in: app Permalink

It’s now possible to resolve relations with the live updates from the input event of the Storyblok Javascript bridge.

If you call the function resolveRelations the relations provided as second argument will be solved.

How to use?

You can use the storyblok bridge function .resolveRelations.

window.storyblok.resolveRelations(storyObject, relationsToResolve, callbackWhenResolved) 

in callback of the input event after the addComments function.


window.storyblok.on('input', (event) => {
  window.storyblok.resolveRelations(event.story, ['', 'blog.categories'], () => {
    // event.story.content has now the resolved relations
    // this.content = event.story.content