RTE Link Picker: Fix media selection to allow items not permitted at root.#21678
RTE Link Picker: Fix media selection to allow items not permitted at root.#21678nielslyngsoe merged 4 commits intomainfrom
Conversation
AndyButland
left a comment
There was a problem hiding this comment.
I've tested this one out and can confirm it works as expected. Previously I couldn't select "Image" types if I marked them as not allowed in the root, and now I can.
Please consider if you have any concerns or want second opinions on any of the front-end coding points @engijlr, and if so, we should wait for a FE-er review too. But from a functionality perspective, it looks good to me.
|
Thanks for testing it @AndyButland. I think it would be nice if we could get an opinion from a front-ender, since I removed a function that, according to my tests and investigation, was redundant and the problematic one, but it might have been there for a reason that I couldn't see. |
nielslyngsoe
left a comment
There was a problem hiding this comment.
This works and is right, but my review revealed another problem.
You can pick anything, but the RTE implementation only allows for inserting images+svg.
So I created this issue:
#21824
Summary
Changes:
input-media.context.ts: AddedisUmbracoFolder()check to thepickableFilterto exclude folders from being selectablelink-picker-modal.element.ts: Removed the unnecessary#getMediaTypes()method andallowedContentTypeIdsprop since folder exclusion is now handled at the filter levelFixed: #18156