I would like to add some custom JavaScript to the CMS page create/edit pages in Magento 2 admin. So basically when you want to create a new page or edit an existing one, it should load some JavaScript preferably before body closing tag.
How would I go about doing this? I've already looked at the following posts:
- Adding custom CSS to admin backend (thought it might similarly for js)
- How to add custom css for adminhtml (same as previous)
- http://alanstorm.com/magento_2_and_requirejs/
- Magento 2 override amin js file
- Unable to run custom js to admin backend
The one by Alan Storm did work, but it loaded my js on all admin pages, but that's not the idea, I just want to load my js for the CMS page create and edit pages.
Does anyone know how to do this?