mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
32 lines
878 B
HTML
32 lines
878 B
HTML
<script>
|
|
$(function() {
|
|
var editor;
|
|
var parent = window.opener ? window.opener : window.parent;
|
|
var parent_input = $("#{$parent_input_id}", parent.document);
|
|
var parent_iframe = parent_input.siblings("iframe.editor_iframe");
|
|
CKEDITOR.on('instanceReady', function(evt) {
|
|
editor = evt.editor;
|
|
editor.setData(parent_input.val());
|
|
editor.on("resize", function(evt){
|
|
var height = evt.data.outerHeight;
|
|
parent_iframe.height(height);
|
|
});
|
|
editor.on("change", function() {
|
|
var content = editor.getData();
|
|
parent_input.val(content);
|
|
});
|
|
parent_iframe.height($(".cke_chrome").parent().height());
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
body { margin: 0; }
|
|
.wfsr { display: none; }
|
|
</style>
|
|
|
|
<form>
|
|
<input type="hidden" name="primary_key" id="primary_key" value="" />
|
|
<input type="hidden" name="content" id="content" value="" />
|
|
{$editor}
|
|
</form>
|