Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Can't use scripts inside iframe #272

@kartomantas

Description

@kartomantas

Describe the bug
I need to use scripts inside iframe for some of my custom components. For example, carousel. I need to include this script tag:
<script src="/assets/theme/js/owl.carousel.min.js"></script>

Version
KEditor version 1.1.7

To Reproduce
Tried to put the script right before closing tag:
<div id="content-area">
Also tried to put the script right after

    <script type="text/javascript" data-keditor="script">
        $(function () {
            $('#keditor-area').keditor();
        });
    </script>

Documentation only tells how to seperate main document styles from iframe styles. No info about how to seperate main document scripts from iframe scripts.

Expected behavior
I expected scripts to work in iframe but they simply won't do their thing. Same as they are never loaded.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 107.0.5304.88 (Official Build) (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions