Adding in your own JavaScript is easy, but the tricky bit is detecting a document opening. I'm not aware of any such event that fire. You could create a property editor on the pages in question or you could just have a setInterval() running that detects a new edit state either by inspecting the DOM or the URL. This might help?
Basically, it's related to a question I posted earlier about making the back-office document editing screen lay out the fields in the same fashion as the published front-end page by using javascript to fetch the template (using a web service perhaps) and then moving properties or injecting css with jQuery so the editor sees the editing screen looking as close as to the actual final page view as possible.
Not intending to change the editing at all, simply where the properties are laid out, and possibly injecting some new dom elements.
The ordering in the document type isn't working? I think v.7.5 has some bug fixes for were it wasn't working so that might solve it. Otherwise polling with setInterval() should work.
Run my own javascript in back end
Following on from an earlier question of mine : is it possible to add javascript to the back end that runs when a user opens a document for editing?
Adding in your own JavaScript is easy, but the tricky bit is detecting a document opening. I'm not aware of any such event that fire. You could create a property editor on the pages in question or you could just have a
setInterval()
running that detects a new edit state either by inspecting the DOM or the URL. This might help?Would $(document).ready() not work - not aware, I suppose, of Angular having finished all its stuff.
That will run when the entire page loads, but that doesn't happen when you select a new item to edit.
What are you trying to do with your JavaScript? It's possible there is a better solution.
Basically, it's related to a question I posted earlier about making the back-office document editing screen lay out the fields in the same fashion as the published front-end page by using javascript to fetch the template (using a web service perhaps) and then moving properties or injecting css with jQuery so the editor sees the editing screen looking as close as to the actual final page view as possible.
Not intending to change the editing at all, simply where the properties are laid out, and possibly injecting some new dom elements.
The ordering in the document type isn't working? I think v.7.5 has some bug fixes for were it wasn't working so that might solve it. Otherwise polling with
setInterval()
should work.is working on a reply...