Unable to wrap the upload element in rich text with link #1231
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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: 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! |
Beta Was this translation helpful? Give feedback.
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!