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

3.0.2 (2026-06-05)

  • Version aligned with Kotti2 3.0.2

  • 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-3.0.2.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-3.0.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kotti2_iframe-3.0.2.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-3.0.2.tar.gz
Algorithm Hash digest
SHA256 f3fa218b535fcd8edf4953918574a8ac9b06d7658014cfc3611a906cca3cfbbd
MD5 a8ad860da9a7b1cc73c3939c493c7237
BLAKE2b-256 d4cc1cfe174b6dc555a93e8db4ec3618e96f079ff075abb6aab310544d28190b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kotti2_iframe-3.0.2-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-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21e639929bbc1ee0afca423da41c4feffa944b7b404a871839946cd4b971cec5
MD5 8683715cf764056837b89b453fa6edcf
BLAKE2b-256 019f93abff0b413ff34ade8b3367a0500f0f55830de99d01e9b33dadd1a661ab

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