Discussing the MediaEmbed element 🎥 #1108
Replies: 2 comments 1 reply
-
Short answer is I don't remember, it has been that way for a while. At one point I also added https://github.com/udecode/plate/blob/main/packages/elements/media-embed-ui/src/MediaEmbedElement/MediaEmbedUrlInput.tsx#L18-L29 so someone could paste full embed code and we could parse the URL. I'd be fine with a PR that removes the split on ? provided that it also works for parsing when someone pastes the full html embed code. Or I can look at it sometime soon. Twitter sort of by default insists on a JS widget rather than an iframe. I was thinking of detecting twitter URLs and doing something like https://twitframe.com/. |
Beta Was this translation helpful? Give feedback.
-
For Twitter, I've opened a discussion #1109 |
Beta Was this translation helpful? Give feedback.
-
Little doubt about deserialization
This is code from getMediaEmbedDeserialize
Is it intended to split on '?', if so, why?
If I get the purpose of media embed there will be multiple sources of embeds, is this to remove some extra URL parameter in general?
A question on Twitter embeds
Is there any discussion around how Twitter embeds will be implemented?
I believe the embed original URL(sent by the user) should always be kept, in case the way of generating a embed changes. Twitter has this website https://publish.twitter.com/, and some best practices https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/guides/cms-best-practices that could be helpful. What is the "Plate way" of approaching this?
Beta Was this translation helpful? Give feedback.
All reactions