Best way to handle server generated a tags for client side navigation? #2886
Unanswered
CapitaineToinon
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm trying to render HTML that was rendered from markdown using Laravel. This can easily be done in vuejs using the v-html directive. However, links rendered in there are regular a tags and not Inertia's Link, meaning I don't get client side navigation if the user has generated pages that links to other pages from the site.
In my opinion, the way Sveltekit handles client side navigation really is the best, just render a tags and let the framework do the rest. With Inertia though, I need to import and render a Link component, which I cannot do in this case. I know I could setup a click listener on a tags and call router.visit but this has common pitfalls such as middle clicks, ctrl + clicks, etc.
Is there a built in way to handle this or am I out of luck? Has anyone already encountered this problem?
Thanks in advance for the help.
Beta Was this translation helpful? Give feedback.
All reactions