Rich Content Editor Button Tools

The methods outlined here use resource selection, which is deprecated.

See the Deep Linking documentation to design a tool that can add content to the RCE in a way that conforms with the most up to date IMS LTI standard.

An extension to standard LTI, external tools can be configured to appear as buttons in the rich content editor. When a tool is configured, users will see it appear in the rich content editor for any pages inside the appropriate course/account. If a user clicks the button, a popup will appear where the external tool will be loaded. The tool should direct users to select or build some piece of content, then submit that content to the tool. The tool will then redirect the user to the LTI success URL with some additional parameters. Canvas will take this information and use it to embed rich content into the appropriate editor window.

If there are many editor buttons configured for a course, Canvas will show the first 3 as icons, and add a "more tools" icon that will show the rest of the configured tools in a dropdown.

When tools are loaded as rich editor buttons, Canvas sends an additional parameter to notify the tool of the directive, ext_content_return_types=embed_content. When a tool receives this directive, it means Canvas is expecting the tool to redirect the user to the LTI success URL with some additional parameters. These additional parameters tell Canvas what type of content to embed, as listed below. Remember to URL encode parameter values such as url.

Remember, to prevent unexpected security warnings for users, it's recommended that all URLs you return be over SSL (https instead of http).

Possible Redirect Parameters

to embed an image:

return_type=image_url (required)
url=<url> this is used as the 'src' attribute of the embedded image tag (required)
alt=<text> this is used as the 'alt' attribute of the embedded image tag (required, can be empty string)
width=<number> this is used as the 'width' style of the embedded image tag (required)
height=<number> this is used as the 'height' style of the embedded image tag (required)

examples:

If the launch_presentation_return_url were http://www.example.com/done, possible return URLs could include:

to embed an iframe:

return_type=iframe (required)
url=<url> this is used as the 'src' attribute of the embedded iframe (required)
title=<text> this is used as the 'title' attribute of the embedded iframe (optional)
width=<number> this is used as the 'width' style of the embedded iframe (required)
height=<number> this is used as the 'height' style of the embedded iframe (required)

examples:

If the launch_presentation_return_url were http://www.example.com/done, possible return URLs could include:

to embed a link:

return_type=url (required)
url=<url> this is used as the 'href' attribute of the inserted link (required)
text=<text> this is the suggested text for the inserted link. Highlighted content will be overwritten by this value. (required)
title=<text> this is used as the 'title' attribute of the inserted link (optional)
target=<text> this is used as the 'target' attribute of the inserted link (optional, only '_blank' is allowed as a value)

examples:

If the launch_presentation_return_url were http://www.example.com/done, possible return URLs could include:

to embed an external tool link:

return_type=lti_launch_url (required)
url=<url> this is URL that will be used to load the external tool (required)
title=<text> this is used as the 'title' attribute of the inserted external tool link (optional)
text=<text> this is the suggested text for the inserted link. Highlighted content will be overwritten by this value. (required)

examples:

If the launch_presentation_return_url were http://www.example.com/done, possible return URLs could include:

Remember that these links would only work if the current tool or some other tool was set to match on either the exact URL returned or the domain (in this case othersite.com)

to embed any other rich content:

For other types of rich content (such as a video tag, a large block of text, etc.) we also support the oEmbed standard. oEmbed works by giving Canvas an additional URL that can be queried to retrieve the block of content to be embedded. See http://oembed.com for more details about how oEmbed works

return_type=oembed (required)
url=<url> this is the oEmbed resource URL (required)
endpoint=<url> this is the oEmbed API endpoint URL (required)

examples:

If the launch_presentation_return_url were http://www.example.com/done, possible return URLs could include:

Settings

All of these settings are configurable for the "editor_button" placement in the tool configuration