-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Embed extension adds iframe two times #1043
Comments
Thanks for opening this bug report! Could you please share your configuration, the code you're using to instantiate the parser, and some sample Markdown showing the issue? I ask because our test suite isn't showing this issue, so it would be helpful to know how/why your instance is behaving differently. |
Hello. Yes, this is the configuration $embedLibrary = new Embed();
$embedLibrary->setSettings([
'oembed:query_parameters' => [
'maxwidth' => 800,
'maxheight' => 600,
],
'twitch:parent' => 'example.com',
'facebook:token' => '1234|5678',
'instagram:token' => '1234|5678',
]);
$config = [
'table' => [
'wrap' => [
'enabled' => true,
'tag' => 'div',
'attributes' => ['class' => 'table-responsive'],
],
'alignment_attributes' => [
'left' => ['align' => 'left'],
'center' => ['align' => 'center'],
'right' => ['align' => 'right'],
],
],
'default_attributes' => [
Table::class => [
'class' => 'table table-bordered table-striped table-hover',
],
Link::class => [
'class' => '',
'target' => '_blank',
],
],
'embed' => [
'adapter' => new OscaroteroEmbedAdapter($embedLibrary), // See the "Adapter" documentation below
'allowed_domains' => ['youtube.com', 'x.com', 'vakansiya.biz'],
'fallback' => 'link',
],
];
$environment = new Environment($config);
$environment->addExtension(new CommonMarkCoreExtension());
$environment->addExtension(new GithubFlavoredMarkdownExtension());
$environment->addExtension(new TableExtension());
$environment->addExtension(new TaskListExtension());
$environment->addExtension(new DefaultAttributesExtension());
$environment->addExtension(new EmbedExtension()); |
Thanks for sharing this! Unfortunately, I'm still unable to replicate your issue, even with that configuration 😕 I get a single line of output containing a single embed. |
Version(s) affected
2.5
Description
I use Embed extension in my app. The only problem - it adds iframe two times.
How to reproduce
Just add any youtube or x.com link. You will see that it added 2 iframes for the given link
Possible solution
No response
Additional context
No response
Did this project help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: