mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Automatically insert video when iframe source is pasted into editor
This commit is contained in:
parent
b340d95e18
commit
a305745aa5
3 changed files with 17 additions and 1 deletions
|
|
@ -16,7 +16,7 @@
|
|||
.xe_content.editable blockquote.q6{border:1px dashed #707070}
|
||||
.xe_content.editable blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
|
||||
.xe_content.editable table .xe_selected_cell{background-color:#d6e9ff}
|
||||
|
||||
.xe_content.editable img.cke_iframe{background-color:#444}
|
||||
.xe_content.editable blockquote
|
||||
{
|
||||
padding: 2px 0;
|
||||
|
|
|
|||
|
|
@ -143,6 +143,14 @@ function getAutoSavedSrl(ret_obj, response_tags, c) {
|
|||
if(!opts.enableToolbar) instance.config.toolbar = [];
|
||||
});
|
||||
|
||||
instance.on('paste', function(e) {
|
||||
if (e.data && e.data.dataValue && e.data.dataValue.replace) {
|
||||
e.data.dataValue = e.data.dataValue.replace(/<(iframe|object)\s[^<>]+<\/\1>/g, function(m) {
|
||||
return String(m).unescape() + '<p> </p>';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$containerEl.data('cke_instance', instance);
|
||||
|
||||
window.editorRelKeys[data.editorSequence] = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue