Skip to main content

Kotti plugin for embedding external content via iframe

Project description

kotti2_iframe

This is an extension to Kotti2 that allows you to embed external web pages and online playgrounds using HTML iframes.

This package is only compatible with Kotti2 version 3.0.0 and later.

Use Cases

  • Embed online code playgrounds (Repl.it, CodePen, JSFiddle, etc.)

  • Embed documentation pages

  • Embed interactive tools and applications

  • Create language learning pages with live examples

Features

  • Simple Integration: Add iframe content through Kotti’s admin interface

  • Flexible Sizing: Configure width and height using CSS values

  • Security Controls: Sandbox attributes for secure embedding

  • External Links: Optional button to open content in new tab

  • Embed-Only View: Minimal view for AJAX or custom integration

Installation

Install the package:

pip install kotti2_iframe

Then activate the configurator in your INI file:

kotti.configurators =
    kotti_iframe.kotti_configure

Configuration

No additional configuration is required. The IframeContent type will be automatically added to the list of addable content types.

Usage

  1. In your Kotti site, navigate to the location where you want to add the iframe

  2. Click “Add” and select “Iframe Content”

  3. Fill in the required fields: - Title: The title of the iframe content - Iframe URL: The URL to embed - Width/Height: CSS dimensions (e.g., “100%”, “600px”) - External URL: Optional link to open in new tab

Example Playgrounds

Here are some popular playgrounds you can embed:

Repl.it (Python):

https://replit.com/@username/repl-name?embed=true

CodePen:

https://codepen.io/username/embed/pen-id

JSFiddle:

https://jsfiddle.net/username/id/embedded/

Google Colab:

https://colab.research.google.com/drive/id

Security Considerations

The iframe uses sandbox attributes to restrict what the embedded content can do. By default, the sandbox allows:

  • Scripts execution (allow-scripts)

  • Same-origin access (allow-same-origin)

  • Form submission (allow-forms)

  • Opening popups (allow-popups)

You can customize these restrictions in the add/edit form.

Development

Contributions to kotti2_iframe are highly welcome.

Report bugs and feature requests at: https://github.com/skywalk163/kotti_py312/issues

License

BSD-3-Clause License. See LICENSE.txt for details.

Changes

0.1.0 (2026-06-05)

  • Initial release

  • Basic IframeContent type with view and embed templates

  • Configurable width, height, sandbox attributes

  • External link button support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kotti2_iframe-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kotti2_iframe-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file kotti2_iframe-0.1.0.tar.gz.

File metadata

  • Download URL: kotti2_iframe-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for kotti2_iframe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ddcc2a81c781b6ae0aaeaf2ba12e55b7bc56e0ea44cf3f8709d1f29ec01f168
MD5 2696945dd7b5c2295541a6b46067f0a4
BLAKE2b-256 f98aa370a70d72a90eff1e63b8d581632cf4cfc12a75dc84fecdded9e3337978

See more details on using hashes here.

File details

Details for the file kotti2_iframe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kotti2_iframe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for kotti2_iframe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb7d14f3e0c730a6f5c29e45d55fac06fa368028a0d8366693811f1d9969bd80
MD5 451e852de17691f5d3d928599725a2c5
BLAKE2b-256 8bbc7f1661a2435883d5786b642c99655066a49d4f3787705eafd0095fcc8efd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page