CodePen icon

CodePen

Maintained by Arnaud Trouvé
A filter to embed Pens from their URL on codepen.io
Price option: Free

Supports Moodle 2.4-5.2 See all versions
Latest release: 2 months ago
Installations: 72
Downloads (last 90 days): 75

Frankenstyle name: filter_codepen
Filters

Description

This is a text filter to embed a CodePen from codepen.io into a text area in Moodle. Simply enable the plugin and paste the direct URL to a Pen in your content (or heading if enabled). A standard URL looks like this:

https://codepen.io/[username]/pen/[Pen ID]

For example:

https://codepen.io/thedannywahl/pen/Gbdaj

Notes

  • CodePen does not have an API so we cannot manipulate the appearance of embeds on a per-Pen basis, so settings here are global.
  • If a user does not have javascript enabled a text fallback is provided with a link to the Pen.
  • Links to Pens are escaped if you do not want to embed. E.g.:
    <a href="https://codepen.io/thedannywahl/pen/Gbdaj">https://codepen.io/thedannywahl/pen/Gbdaj</a>
  • Make sure that if you have the "urltolink" filter enabled that the CodePen filter is listed first because links are escaped.
  • Do not use www. or cdpn.io short-link, these are not valid pen URLs. Visiting them in a browser always redirects to the full Pen URL path (as exampled above).
  • This filter only works with the /pen/ URL. It will not embed from other views like /full/ /live/ etc...

Contributors

Awards

Early bird 3.3
Early bird 3.4
Early bird 3.5
Privacy friendly
Early bird 3.6
Early bird 3.7
Early bird 3.8
Early bird 3.9
Early bird 3.10
Early bird 3.11
Early bird 4.0
Early bird 4.1
Early bird 4.2
Early bird 4.3
Early bird 4.4
Early bird 4.5
Early bird 5.0
Early bird 5.1