R
R
Roman Savitsky2018-03-12 12:35:34
JavaScript
Roman Savitsky, 2018-03-12 12:35:34

Ckeditor, after the added YouTube video, a frame with Iframe text is displayed. What are the subtleties?

Hello !
Connected to the site this script

https://cdn.ckeditor.com/4.7.2/full-all/ckeditor.js

The visual editor works, everything is fine.
I attached this plugin to my editor in https://github.com/fonini/ckeditor-youtube-pluginorder to be able to add YouTube videos to the text. Video added, everything is ok.
Problem: If you switch to the "Source" tab (we see html tags) and then switch to the editor mode, then instead of the video, just a frame with the Iframe text is displayed. Or if you save the post content and reload the page, the same story is observed.
5aa649b1a1773062571900.png
Comrades help, what's the nuance? I couldn't find anything on google about this...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Karen Ananiev, 2018-03-12
@PRC

CKEditor has an iframe plugin that replaces all iframe elements with what they call a fake object. But this only happens when the data is transformed. That is, first the youtube plugin inserts an iframe with a video without taking into account other plugins, and when you switch to wysiwyg mode from html mode, then ckeditor applies the transformations of its plugins. In this case, this is a flaw of the youtube plugin developers - they did not take into account and did not take care of it.
The best solution would be a widget-based option, like the standard one https://ckeditor.com/cke4/addon/embed - but there are no video settings, alas.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question