Skip Navigation

Code Fragment

Skip Side Navigation

Code Fragment – OU Web

The Code Fragment can be used for a series of code you may want placed on your page.

NOTE: If you are embedding a form, video, etc. from somwhere else, the code may have a URL as part of the code – you may need to remove the http: or https: – starting the URL with // makes it a relative link (visible in both http and https environments)

http: shows up on the live site (will not be visible in author)
https: shows up in author (may not be visible on live site)

Usage

  • Forms – specifically Wufoo and Google Forms – Qualtrics may be embedded via Iframe Component
  • Vimeo Videos – YouTube videos may be embedded via Youtube Component
  • Etc., etc.

Where to Find It

Co, Code Fragment, OU Web

You can find the Code Fragment component in your trusty side panel.

What It Looks Like


  • Code Properties: Copy and paste the embed code you get from a system, or place the code you need to use to manipulate your content

To Edit, Etc.


When you select the component, you can:

  • Edit: Edit component
  • Delete: Delete a component
  • Group: To select multiple components at once (to move, cut, copy)

Vimeo Video

Code:

<iframe src="//player.vimeo.com/video/231557692" width="100%" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="//vimeo.com/231557692">This Is a Generic Millennial Ad</a> from <a href="//vimeo.com/dissolve">Dissolve</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

NOTE: https: has been removed from the code above. Starting the URL with // makes it a relative link (visible in both http and https environments).

http: shows up on the live site (will not be visible in author)
https: shows up in author (may not be visible on live site)

Google Form

Code:

<iframe src="//docs.google.com/forms/d/e/1FAIpQLScx1rPjb8J34CKexu3Ry743rsQiJRZgsB-N5EMf12bA3FwdNg/viewform?embedded=true" width="625" height="1500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>

NOTE: https: has been removed from the code above. Starting the URL with // makes it a relative link (visible in both http and https environments).

http: shows up on the live site (will not be visible in author)
https: shows up in author (may not be visible on live site)