{"id":16998459,"url":"https://github.com/zoonru/commonmark-ext-youtube-iframe","last_synced_at":"2025-03-22T15:31:09.423Z","repository":{"id":36475939,"uuid":"227612782","full_name":"zoonru/commonmark-ext-youtube-iframe","owner":"zoonru","description":"Extension for league/commonmark to replace youtube link with iframe.","archived":false,"fork":false,"pushed_at":"2022-06-20T11:12:35.000Z","size":29,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T17:12:18.995Z","etag":null,"topics":["commonmark","extension","iframe","markdown","youtube"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoonru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-12T13:24:57.000Z","updated_at":"2023-09-26T19:17:32.000Z","dependencies_parsed_at":"2022-08-22T20:40:59.975Z","dependency_job_id":null,"html_url":"https://github.com/zoonru/commonmark-ext-youtube-iframe","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoonru%2Fcommonmark-ext-youtube-iframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoonru%2Fcommonmark-ext-youtube-iframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoonru%2Fcommonmark-ext-youtube-iframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoonru%2Fcommonmark-ext-youtube-iframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoonru","download_url":"https://codeload.github.com/zoonru/commonmark-ext-youtube-iframe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244227577,"owners_count":20419263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonmark","extension","iframe","markdown","youtube"],"created_at":"2024-10-14T04:05:18.729Z","updated_at":"2025-03-22T15:31:08.952Z","avatar_url":"https://github.com/zoonru.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube iframe extension\n\nExtension for [league/commonmark](https://github.com/thephpleague/commonmark) to replace youtube link with iframe.\n\n## Install\n\n``` bash\ncomposer require zoon/commonmark-ext-youtube-iframe\n```\n\n## Test\n```\n./vendor/bin/phpunit\n```\n\n## Example\n\n``` php\nuse League\\CommonMark\\CommonMarkConverter;\nuse Zoon\\CommonMark\\Ext\\YouTubeIframe\\YouTubeIframeExtension;\n\n$converter = new CommonMarkConverter([\n    'youtube_iframe' =\u003e [\n        'width' =\u003e '600',\n        'height' =\u003e '300',\n        'allow_full_screen' =\u003e true,\n    ],\n]);\n\n$converter-\u003egetEnvironment()-\u003eaddExtension(new YouTubeIframeExtension());\n\necho $converter-\u003econvert('Check this: [](https://youtu.be/mVnSpPMgoWM?t=10)')-\u003egetContent();\necho $converter-\u003econvert('Check this: [](https://www.youtube.com/watch?v=mVnSpPMgoWM\u0026t=10)')-\u003egetContent();\n```\n\n``` bash\n\u003cp\u003eCheck this: \u003ciframe width=\"600\" height=\"300\" src=\"https://www.youtube.com/embed/mVnSpPMgoWM?start=10\" frameborder=\"0\" allowfullscreen=\"1\"\u003e\u003c/iframe\u003e\u003c/p\u003e\n\u003cp\u003eCheck this: \u003ciframe width=\"600\" height=\"300\" src=\"https://www.youtube.com/embed/mVnSpPMgoWM?start=10\" frameborder=\"0\" allowfullscreen=\"1\"\u003e\u003c/iframe\u003e\u003c/p\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoonru%2Fcommonmark-ext-youtube-iframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoonru%2Fcommonmark-ext-youtube-iframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoonru%2Fcommonmark-ext-youtube-iframe/lists"}