CKEditor 5 showing video element, but plain HTML inserted in a div does not show the element

吃可爱长大的小学妹 提交于 2019-12-24 20:30:46

问题


I am creating a lesson editor. The user can edit the content (text, videos, links, images etc) or view the final result (the rendered html).

The editor works fine, but when I show the rendered html the linked youtube videos are not visible.

This is the editor part, as you can see the video linked is visible:

And this is the 'rendered' version; the video is missing (it looks like it's not rendering the figure tag and the oembed tag, but why?):

The html is:

<h2>This is the header of this section</h2>
<figure class="media">
<oembed url="https://www.youtube.com/watch?v=7km4EHgkQiw&amp;list=RDQK-Z1K67uaA&amp;index=9"></oembed>
</figure>

<p>Please let the student introduce himself.</p><blockquote><p>&nbsp; ‘I was in no mood for talk and I was unpleasantly surprised to find Judy Poovey brushing her teeth at the sink. […]<br>‘Hi, Richard,’ she said, and spit out a mouthful of toothpaste. She was wearing cut-off jeans that had bizarre, frantic designs drawn on them in Magic Marker and a spandex top which revealed her intensely aerobicized midriff.<br>‘Hello,’ I said, setting to work on my tie.<br>‘You look cute today.’<br>‘Thanks.’<br>‘Got a date?’<br>I looked away from the mirror, at her. ‘What?’<br>‘Where you going?’<br>By now I was used to her interrogations.’ (pp. 51-52)</p></blockquote>

<figure class="media">
<oembed url="https://www.youtube.com/watch?v=7km4EHgkQiw&amp;list=RDQK-Z1K67uaA&amp;index=9">
</oembed>
</figure>

来源:https://stackoverflow.com/questions/57320194/ckeditor-5-showing-video-element-but-plain-html-inserted-in-a-div-does-not-show

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!