PHPackages                             ueberdosis/commonmark-embed-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ueberdosis/commonmark-embed-extension

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ueberdosis/commonmark-embed-extension
=====================================

An embed extension for league/commonmark

0.2.1(4y ago)31.8k1MITPHPPHP ^8.0

Since Oct 19Pushed 4y ago2 watchersCompare

[ Source](https://github.com/ueberdosis/commonmark-embed-extension)[ Packagist](https://packagist.org/packages/ueberdosis/commonmark-embed-extension)[ Docs](https://github.com/ueberdosis/commonmark-embed-extension)[ GitHub Sponsors](https://github.com/sponsors/ueberdosis/)[ RSS](/packages/ueberdosis-commonmark-embed-extension/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

> We need your support to maintain this package. 💖

CommonMark Embed Extension
==========================

[](#commonmark-embed-extension)

[![](https://camo.githubusercontent.com/7da161570d2ceebd8f205783abdebea05b9206eb61c8697a808c3bf842bc0bb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7565626572646f7369732f636f6d6d6f6e6d61726b2d656d6265642d657874656e73696f6e2e737667)](https://packagist.org/packages/ueberdosis/commonmark-embed-extension)[![Tests](https://github.com/ueberdosis/commonmark-embed-extension/actions/workflows/test.yml/badge.svg)](https://github.com/ueberdosis/commonmark-embed-extension/actions/workflows/test.yml)[![](https://camo.githubusercontent.com/8bea299ba1790ecd86e5eda5929078b254e0bae07ce008d05fe2d1e995280eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7565626572646f7369732f636f6d6d6f6e6d61726b2d656d6265642d657874656e73696f6e2e737667)](https://packagist.org/packages/ueberdosis/commonmark-embed-extension)[![Sponsor](https://camo.githubusercontent.com/ee73cad5907779cdf16e865239ea623ca0bd44ccd5ad44fa7bfe7a5ac3ced298/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d476974487562)](https://github.com/sponsors/ueberdosis)

An extension to transform URLs to embeds with [league/commonmark](https://github.com/thephpleague/commonmark).

Example
-------

[](#example)

### Markdown

[](#markdown)

```
OMG, you should see this video:

https://www.youtube.com/watch?v=eX2qFMC8cFo

It‘s amazing, isn’t it?
```

### HTML

[](#html)

```
OMG, you should see this video:

It‘s amazing, isn’t it?
```

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ueberdosis/commonmark-embed-extension
```

Supported services
------------------

[](#supported-services)

- YouTube
- Vimeo

H[ave a look at the provided services](https://github.com/ueberdosis/commonmark-embed-extension/tree/main/src/Services) to learn how you can add your own integrations. Don’t forget to send a PR with your additions!

Usage
-----

[](#usage)

```
