LTI Embed IFrame not working as expected.

Velir
Community Member

Hello Canvas community,


I am building an LTI app to embed iFrames.

I believe I configured my app correctly

 

<cartridge_basiclti_link
  xmlns="http://www.imsglobal.org/xsd/imslticc_v1p0"
  xmlns:blti="http://www.imsglobal.org/xsd/imsbasiclti_v1p0"
  xmlns:lticm="http://www.imsglobal.org/xsd/imslticm_v1p0"
  xmlns:lticp="http://www.imsglobal.org/xsd/imslticp_v1p0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.imsglobal.org/xsd/imslticc_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticc_v1p0.xsd http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0p1.xsd http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd">
  <blti:title>Embed POC</blti:title>
  <blti:launch_url>https://url/canvas/courses</blti:launch_url>
  <blti:custom></blti:custom>
  <blti:extensions platform="canvas.instructure.com">
    <lticm:property name="tool_id">embedexample</lticm:property>
    <lticm:property name="domain">url</lticm:property>
    <lticm:property name="privacy_level">public</lticm:property>
    <lticm:property name="selection_width">600</lticm:property>
    <lticm:property name="selection_height">600</lticm:property>
    <lticm:property name="text">Embed POC</lticm:property>
    <lticm:options name="editor_button">
      <lticm:property name="enabled">true</lticm:property>
      <lticm:property name="url">https://url/canvas/courses</lticm:property>
      <lticm:property name="message_type">ContentItemSelectionRequest</lticm:property>
      <lticm:property name="text">Embed POC</lticm:property>
      <lticm:property name="icon_url">n/a</lticm:property>
      <lticm:property name="selection_width">600</lticm:property>
      <lticm:property name="selection_height">600</lticm:property>
    </lticm:options>
  </blti:extensions>
</cartridge_basiclti_link>

 

 

Then in my tool:

 

<form enctype="application/x-www-form-urlencoded" method="post" action="https://returnURL/external_content/success/external_tool_dialog">
        <input type="hidden" name="lti_message_type" value="ContentItemSelection">
        <input type="hidden" name="lti_version" value="LTI-1p0">
        <input type="hidden" name="content_items" value="{&quot;@context&quot;:&quot;http://purl.imsglobal.org/ctx/lti/v1/ContentItem&quot;,&quot;@graph&quot;:[{&quot;url&quot;:&quot;https://www.externalwebsite.com&quot;,&quot;embed&quot;:{&quot;html&quot;:&quot;<iframe src='https://www.externalwebsite.com'></iframe>&quot;},&quot;iframe&quot;:{&quot;width&quot;:600,&quot;height&quot;:600,&quot;src&quot;:&quot;https://www.externalwebsite.com&quot;},&quot;@type&quot;:&quot;link&quot;}]}">
        <input type="submit" value="Embed Item">
    </form>

 

When I submit Canvas is generating a link tag `<a href="www.externalwebsite.com"></a>` instead of an iFrame.

What I am doing wrong?

Labels (1)
0 Likes