I’m looking to have TinyMCE RTE know where to point a media source for its image dialogue box based on template. The ideal is that I’d like to use 1 media source for a whole site, except for resources that are set to a specific template.
I’ve tried the following unsuccessfully:
using $modx->setOption on manager init to set the default_media_source - doesn’t look like that sticks long enough for the browse popup to take
using migxResourceMediaPath in a media source path - it seems unable to determine the docID which adds up because the path it tries to grab is from http_referrer which is returning https://url.site/manager/index.php?a=browser&source=15&ctx=web which doesn’t help with the ability to grab an ID matched to the page
Also - I’ve found that when I change the source= part of the file browser URL it’s completely ignored (seems to make no difference to the media source being initiated). Is that expected behaviour at the moment? I don’t know enough yet to ‘follow the white rabbit’ on manager actions in the code base.
Anyone have any ideas on other things to try for the original issue?
It’s my hope that effectively on manager page load I could get a one-off config to be written into the page that TinyMCE RTE then knows what to do with as far as opening a path in the image/media browser.