Custom Templates with Scratchpad UI and injected code

Re: Custom Templates with Scratchpad UI and injected code

by Richard Lobb -
Number of replies: 0
If you inspect the rendered HTML for a CodeRunner question, you should see the original textarea element with an attribute data-global extra that contains what you want. i think you should be able to modify the scratchpad wrapper code to find that textarea and extract the globalextra code from it. I don't think I've ever done exactly that, though, but give it a go and report back.

Don't forget that there will in general be multiple questions on a page so you need to find the right one.