After an outage on September 1, the Instructure Community is now fully available, including guides, release notes, forums, and groups. If some styling still looks unusual, clear your cache and cookies.
Found this content helpful? Log in or sign up to leave a like!
Hi everyone,
I'm working on school templates, and we need any blank page to include specific HTML code automatically:
<div id="dp-wrapper" class="dp-wrapper dp-show-title">
<p>Test</p>
</div>
Is it possible to configure that?
Thank you!
Solved! Go to Solution.
I think you may be able to use javascript to determine when a page is being created and have the code injected into the rich content editor. I am not sure what the specific code would be, but if you have someone who can code, you could then put that custom .js file into the account theme.
@alex_papish Are you wishing to inject this into new pages as they are created or a bunch of existing blank pages? If existing blank pages, you should be able to do API calls to get a list of all the pages and then use other API calls to write the desired code to each page. If you are not sure which pages are blank, you might need another step in there to check the content of each page. You can check out the documentation at https://canvas.instructure.com/doc/api/.
@james_whalley thank you very much for your response. Yes, we want to inject it into new pages as they are created. Is that possible? Thank you!
I think you may be able to use javascript to determine when a page is being created and have the code injected into the rich content editor. I am not sure what the specific code would be, but if you have someone who can code, you could then put that custom .js file into the account theme.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in