问题描述 投票:0回答:1

I修改了代码,以直接使用Twitter的官方嵌入URL。

这里是工作解决方案:

{ name: "twitter", url: /^twitter\.com\/([\w.-]+)\/status\/(\d+)$/, html: (match) => { const id = match[2]; return ( '<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;">' + `<iframe src="https://platform.twitter.com/embed/Tweet.html?id=${id}" loading="lazy"` + ' style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" ' + ' frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>' + "</iframe>" + "</div>" ); }, },

twitter ckeditor embed strapi ckeditor5
1个回答
0
投票
twitframe.com

更改为platform.twitter.com

	

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.