Metadata-Version: 2.4
Name: kotti2_iframe
Version: 0.1.0
Summary: Kotti plugin for embedding external content via iframe
Home-page: https://github.com/skywalk163/kotti_py312
Author: Kotti Community
Author-email: kotti@example.com
License: BSD
Keywords: kotti iframe embed playground cms
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: Pyramid
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: License :: OSI Approved :: BSD License
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: Kotti2>=3.0.0
Provides-Extra: testing
Requires-Dist: pytest<9.0.0,>=7.0.0; extra == "testing"
Requires-Dist: pytest-cov>=4.0.0; extra == "testing"
Requires-Dist: WebTest>=3.0.0; extra == "testing"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

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
