-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using previewsInData config property for media embed gets removed by HTML Purifier #80
Comments
This has been fixed for the next Craft release (craftcms/cms#13108). |
Craft 4.4.8 has been released with that HTML Purifier change. |
Hi Brandon, that's great, thanks for this. |
I am running the latest version of both Craft and the CKEditor plugin and I am still experiencing this issue. All of my settings resemble the above. Any ideas? |
@richardegil I’d first double-check that the URLs of the media you’re trying to embed are whitelisted by your |
@i-just THANK YOU! That fixed my issue. |
So people can copy paste this "HTML.SafeIframe": true,
"URI.SafeIframeRegexp": "%^(https?:)?//(www\\.youtube\\.com/embed/|www\\.youtube\\.com/watch\\?v=.+|youtu\\.be/.+|www\\.youtube(?:-nocookie)?\\.com/embed/|player\\.vimeo\\.com/video/)%" |
@i-just & @kevinmu17 Thanks for this. I didn't have to escape the periods and I added vimeo.com root.
|
I added this to htmlpurfier config. but still video not showing on frontend, do i need to add anythign in twig or any other place.
|
Yea I am the same but looking at the Ckeditor docs you need to setup iframely or embedly to output on the front end https://ckeditor.com/docs/ckeditor5/latest/features/media-embed.html#displaying-embedded-media-on-your-website |
Did you make it work.. |
seems you can.. i tryed with JS::
|
Here is updated code..
|
We’re trying to make use of CKEditor's media embed option for YouTube and Vimeo embeds only. For that reason we’re not looking to subscribe to a premium service such as Iframely, as suggested in the CKEditor docs.
Instead, we’ve enabled the
previewsInData
config option for the editor, which works, but we can’t seem to workaround HTML Purifier removing the code that this option renders instead.When set to true,
previewsInData
renders an embed as the following code:Instead of:
For info, this is our CKEditor config:
And this is our HTML Purifier config:
We're using Craft CMS Pro 4.4.7.1 and CKEditor 3.2.0.
We suspect the
data-oembed-url
is clashing with HTML Purifier, but can’t find any way to enable this attribute. Any advice would be appreciated, thanks.The text was updated successfully, but these errors were encountered: