The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
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="{"@context":"http://purl.imsglobal.org/ctx/lti/v1/ContentItem","@graph":[{"url":"https://www.externalwebsite.com","embed":{"html":"<iframe src='https://www.externalwebsite.com'></iframe>"},"iframe":{"width":600,"height":600,"src":"https://www.externalwebsite.com"},"@type":"link"}]}">
<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?
I got it working changing the content_items value to
{
"@context": "http://purl.imsglobal.org/ctx/lti/v1/ContentItem",
"@graph": [
{
"mediaType": "text/html",
"url": "url",
"text": "<iframe src='url'></iframe>",
"embed": {
"html": "<iframe src='url'></iframe>"
},
"iframe": {
"width": 0,
"height": 0,
"src": "url"
},
"placementAdvice": {
"presentationDocumentTarget": "embed"
},
"@type": "ContentItem"
}
]
}
instead of
{
"@context": "http://purl.imsglobal.org/ctx/lti/v1/ContentItem",
"@graph": [
{
"url": "url",
"embed": {
"html": "<iframe src='url'></iframe>"
},
"iframe": {
"width": 0,
"height": 0,
"src": "url"
},
"@type": "link"
}
]
}
Does anyone knows why the 'link' type didn't work? I can't find the type `ContentItem` in the documentation here : https://www.imsglobal.org/spec/lti-dl/v2p0#link
You have built a LTI tools that implements the older specifications:
LTI 1.1 - https://www.imsglobal.org/specs/ltiv1p1/implementation-guide
Content Item - https://www.imsglobal.org/specs/lticiv1p0/specification
there are newer specifications for these functions and https://www.imsglobal.org/spec/lti-dl/v2p0 is the Deep Linking specification that goes with LTI 1.3.
Community helpTo 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