Say I have a library that is attached to a page that brings along with it some JavaScript. For this example, let’s say the JavaScript has a variable which is the path to an image that the JS displays. This would look something like:
variable.setAttribute('src', drupalSettings.path.baseUrl + pathToPicture)
Now let’s say I want to have pathToPicture configurable via Admin Menu so that one may add their own path to their own picture, instead of using the one that is defaulted to.
How might one go about accomplishing this task? I know the basics of setting up a form and adding it to the admin menu, but I don’t know enough to complete something like this on my own. If there is existing documentation on this sort of procedure, I’d appreciate being directed towards it. Otherwise any ideas are welcome. Thanks!