Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,782
Community Members
 
Community Events
184
Community Groups

What is the confluence source code for a user mention?

Christopher Atterbury
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 19, 2023

I am attempting to mention users with the new ability in Quarto to publish to Confluence. Quarto allows for raw Confluence blocks, so my plan is to put in the source code for mentioning particular users in there. I found that in the Resource Identifier section of the Confluence Storage Document page there is the "user" resource referenced with

<ri:user ri:userkey="2c9680f7405147ee0140514c26120003"/>

I replaced this with the appropriate user key, but could not get it to work properly with the @User_name text.

What is the raw confluence code that I should use for a user mention? Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Andrii Maliuta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 20, 2023

Hello @Christopher Atterbury ,

The page has several types of BODY representation and if you use final HTML, you should consider 'VIEW' representation:

```

<a class=\"confluence-userlink user-mention\" data-username=\"XXXX\" data-account-id=\"XXXX\" href=\"https://x.atlassian.net/wiki/people/XX?ref=confluence\" target=\"_blank\" data-linked-resource-id=\"98305\" data-linked-resource-version=\"1\" data-linked-resource-type=\"userinfo\" data-base-url=\"https://x.atlassian.net/wiki\">John Doe</a>

```

It is persisted in the database as STORAGE state:

<ac:link><ri:user ri:account-id="5d26e612590c9c0c25f78ee8" /></ac:link>

 but is rendered in HTML (VIEW) when viewing it in UI.

You can use REST API to get this data:

https://xx.atlassian.net/wiki/rest/api/content/1111?expand=body.view

https://xx.atlassian.net/wiki/rest/api/content/1111?expand=body.storage

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events