feat: integrate with iframe resizer for embedding myep

This commit is contained in:
Björn Fromme
2024-12-03 17:13:11 +01:00
parent d06f1814e6
commit 1909b4b3e9
4 changed files with 59 additions and 0 deletions
@@ -0,0 +1,18 @@
import { Controller } from '@hotwired/stimulus';
import iframeResize from '@iframe-resizer/parent';
export default class extends Controller {
static values = {
license: {
type: String,
default: 'GPLv3',
}
}
connect() {
iframeResize({
license: this.licenseValue,
waitForLoad: true
}, this.element)
}
}
@@ -8,4 +8,9 @@
[data-rte-content] {
@import "base/rte-content";
}
iframe {
width: 100%;
height: 100vh;
}
}