Streaming live at 10am (PST)

Setting dynamic link color in rich text field


#1

Hi there,

I'm looking to set the text link colour on each blog post based on a unique hex value specified in that post.

This doesn't appear achievable, as far as I can see. Seems I can only set a global link color and apply that to rich text fields once the same class name is specified. Can this be confirmed?

Thanks,
Jerome


#2

Hi!

If I understood you right the following tutorial should help you.

You can add a color field in your collection form.

In your Design you can get this color for your text-link in the settings panel.

With this color field you can give every blogpost a unique link-color.

Did I understand you right?

Greetings


#3

So I need to have the text links in a collection post's rich text field pick up that post-specific hex colour.

It doesn't appear that there's a way of doing this, unless I'm mistaken.

Jerome


#4

Ok - Just to be clear: You want to paste a article (done in word or anything else) with links in it in the rich text field. And in this rich text field the links should get a specific color without any manual editing. Did I understand you right now?

Sorry, but sometimes it hard to understand the special problem. :wink: Maybe you can give us the share link of the website and the specific element and position to get more input. Or some screenshots.

Greetings


#5

Correct! This rich text field should inherit the blog-post-specific hex value specified within the collection field.

Jerome


#6

Ok. In this case I can't help you out.

You could change the overall text link color, but I think this is not what you are looking for. Sorry! Maybe some other readers can help you.

Bye and I'll keep my fingers crossed.


#7

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