Skip to content

Unable to wrap the upload element in rich text with link #1231

Answered by jmikrut
EasonSoong asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @EasonSoong — this is actually intended. If you want to link your uploads, you can add custom upload fields like seen in the demo, in the Page -> Layout -> Content rich text fields:

Here are some docs about this:
https://payloadcms.com/docs/fields/rich-text#upload-element

It might be possible in the future to extend the Link component, but it's tough because of the way that SlateJS works. It would be an "element within an element" as far as Slate is concerned. Not gonna say it's impossible, but the UX of it all could be questionable as well. So we prefer the above method to link uploads within rich text.

Gonna convert this to a discussion for now but would love to know what you think!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by EasonSoong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
2 participants
Converted from issue

This discussion was converted from issue #1226 on October 10, 2022 00:35.