# The links in my rich text field are wrong

**URL:** <https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701>\
**Category:** Developing with Prismic\
**Tags:** graphql\
**Created:** [June 9, 2021, 11:53am UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701 "2021-06-09T11:53:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmwlsh](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@tmwlsh](https://community.prismic.io/u/tmwlsh)\
**Post date:** [June 9, 2021, 11:53am UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/1 "2021-06-09T11:53:23Z")

</div>

In my rich text editor, i am linking to another document, but the link that is rendered, navigates to the same document.

In graphQL, this is the data i get back for the link:

```auto
<a href=\"\">second part of this series</a>

```

Which seems odd?

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 9, 2021, 1:53pm UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/3 "2021-06-09T13:53:55Z")

</div>

Hello Tom walsh,

Welcome to the Prismic community.

When you integrating a Link to a Document in the Rich text filed, a Link Resolver function is necessary, when you render Rich text field in the frontend. Are you adding a Link Resolver function in your project? What framework are you using?

I am sending document link in javascript but you can find in other framework too:

> **[Link Resolving in Javascript](https://prismic.io/docs/technologies/link-resolver-javascript)**
>
> Here we show how to generate links to your prismic.io documents within your website by using a Link Resolver with the prismic-javascript development kit.

Let me know if it still doesn't solve your issue.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![tmwlsh](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@tmwlsh](https://community.prismic.io/u/tmwlsh)\
**Post date:** [June 9, 2021, 3:17pm UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/4 "2021-06-09T15:17:25Z")

</div>

Hey Priyanka, thanks for the reply!  
I haven't worked with Link Resolvers before, but i can take a look into it.  
I am using Gatsby on the front end.

Thanks,  
Tom

---

<div class="post-metadata">

**Author:** ![tmwlsh](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@tmwlsh](https://community.prismic.io/u/tmwlsh)\
**Post date:** [June 10, 2021, 8:30am UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/5 "2021-06-10T08:30:25Z")

</div>

Hey Priyanka, thanks for the link!  
It sounds great!

Where do i use this function once its created?

Cheers!  
Tom

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [June 10, 2021, 12:45pm UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/6 "2021-06-10T12:45:18Z")

</div>

Hello @tmwlsh

You have to follow this documentation:

> **[Link Resolving with Gatsby](https://prismic.io/docs/technologies/link-resolver-gatsby)**
>
> How to create, register, and use a Prismic Link Resolver function in your Gatsby project to generate link urls for Prismic documents or links.

And after creating linkResolver function pass this function to the Richtext where you are rendering this. Please find more details in this doc:[Templating Rich Text fields - Prismic](https://prismic.io/docs/technologies/template-rich-text-gatsby)

Let me know if it still doesn't solve your doubt.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [June 21, 2021, 6:46am UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/7 "2021-06-21T06:46:09Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 3:42pm UTC](https://community.prismic.io/t/the-links-in-my-rich-text-field-are-wrong/5701/8 "2021-12-09T15:42:26Z")

</div>


