Hi,
I would need to colorise a a!linkField. I've tried with a!richTextDisplayField() and a!richTextItem(color: ...) but it does not work.
How would you do (if it is possible)?
a!gridColumn( label: "contract", value: a!linkField( links: { a!recordLink( label: ..., recordType: ..., identifier: ..., ) }, align: "CENTER" ), align: "START", width: "NARROW_PLUS" ),
Regards
Discussion posts and replies are publicly visible
Hi cedric,
Your thinking of using the a!richTextDisplayField actually should work.Maybe you forgot to set the text parameter and just used the link. This example should work:
a!gridField( data: local!data, columns: { a!gridColumn( label: "contract", value: a!richTextDisplayField( value: a!richTextItem( text: "Your link text in purple", link: a!recordLink( label: ..., recordType: ..., identifier: ... ), color: "#800080" /*purple*/ ), align: "CENTER" ), align: "START", width: "NARROW_PLUS" ) } )
It's important to pass the apperaing text as the parmeter (text) of the a!richTextItem().
Hope that helps!
//Kai
Thank you Kais, yes it works because you've removed the a!LinkField function.I already used this workaround, but I would like to know if you can make it working, keeping the LinkField ?
Sure, because the a!linkField() doesn't support colouring. Therefore, you need to use the richText Object if you want to have control over the clour. May I ask why you want to use the linkField insted of the richText?
No reason Kais, I was just curious :-)Thank you for your help.
As this already is working for you, I just want to keep you aware of some things related to it. The link color was introduced by Appian lately. Before that, the link color could only be the accent color of the Appian environment/site.
In the previous versions (my idea is 21.1 or before), the specified link color would only work with the text size as STANDARD and will get back to the accent color as soon as you change the size.
Thank you Harshit for this information.