Skip to content

Can use json data array? #212

Answered by TarekRaafat
Pavel222k asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Pavel222k,

That's possible through using .parentNode.insertBefore() to insert the span inside the href but I would suggest using the onSelection API method instead as shown below:

onSelection: (dataFeedback) => {
  // Prepare the link URL
  const url = dataFeedback.selection.value.urlink;
  // Navigate to the selected item URL
  window.location.href = url;
};

Try it and let me know how it goes.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Pavel222k
Comment options

@TarekRaafat
Comment options

@Pavel222k
Comment options

Answer selected by Pavel222k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants