PHPackages                             liquidlight/typo3-shortcodes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. liquidlight/typo3-shortcodes

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

liquidlight/typo3-shortcodes
============================

Wordpress-style shortcodes for TYPO3

2.3.0(4mo ago)436.7k↓33.3%1[7 issues](https://github.com/liquidlight/typo3-shortcodes/issues)GPL-2.0+PHPCI passing

Since Nov 16Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/liquidlight/typo3-shortcodes)[ Packagist](https://packagist.org/packages/liquidlight/typo3-shortcodes)[ Docs](https://github.com/liquidlight/typo3-shortcodes)[ RSS](/packages/liquidlight-typo3-shortcodes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (20)Used By (0)

Shortcodes
==========

[](#shortcodes)

Wordpress style shortcodes for embedding external content in TYPO3.

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

[](#installation)

```
composer req liquidlight/typo3-shortcodes

```

Usage
-----

[](#usage)

Out of the box the extension comes with plenty of shortcodes to get you started; including YouTube, Vimeo, Facebook, Twitter and several others.

To use the shortcodes, you can use a shorthand syntax or follow the Wordpress, HTML inspired method.

More details below as to the exact usage for each tag, but as an example, the YouTube one could be used like one of the following:

**⚠️ If using a full URL, it is worth leaving a space between the end of the link and the closing square bracket - this prevents the `]` being used in the link**

### Shorthand colon syntax

[](#shorthand-colon-syntax)

```
[youtube: https://www.youtube.com/watch?v=JrFFN9lag2w ]

```

### Shorthand equals syntax

[](#shorthand-equals-syntax)

```
[youtube=https://www.youtube.com/watch?v=JrFFN9lag2w ]

```

### Wordpress Long-form syntax

[](#wordpress-long-form-syntax)

```
[youtube url="https://www.youtube.com/watch?v=JrFFN9lag2w" ]

```

Creating your own keyword
-------------------------

[](#creating-your-own-keyword)

In the land of shortcodes, keyword is the "service" used to trigger the shortcode (e.g. `youtube` in the examples above).

Registering your own keyword requires a new class which extends `LiquidLight\Shortcodes\Keywords\AbstractKeyword`.

An example of how to extend and use can be found in the Classes/Keywords folder - anything but the `AbstractKeyword` class can be copied and used.

Once created, you can add it via the `ext_localconf.php` where `new` is the name of the keyword.

```
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['shortcodes']['processShortcode']['new'] =
    \Vendor\Ext\Keywords\NewKeyword::class;
```

Using this method allows you to overwrite existing keywords if you wish to alter their output. The only requirement is that you return a string.

Existing Shortcodes
-------------------

[](#existing-shortcodes)

All shortcodes allow `title` as an attribute to add a title to `iframe` based shortcodes. If it is not added, it will default to the type (e.g. "Google Maps")

### Facebook

[](#facebook)

`[facebook]`

Copy the URL of a facebook post or video

```
[facebook=https://www.facebook.com/20531316728/posts/10154009990506729/ ]

```

**Properties:**

- url
- width
- height

**Defaults:**

```
[facebook=LINK width="500"]

```

### Google Maps

[](#google-maps)

`[googlemaps]`

**⚠️ Google Maps [requires an API key setting up](https://developers.google.com/maps/documentation/embed/cloud-setup) - see the setup section below for adding your key**

Shows a place, satellite, directions or streetview of a place.

```
[googlemaps search="Paris" ]

```

**Properties:**

All the properties are of that listed [in the documentation](https://developers.google.com/maps/documentation/embed/embedding-map).

The only differences are:

- `search` can be used instead of `q`
- The addition of `loading` - defaults to `lazy` but can be set to `eager`

#### Setup

[](#setup)

To use the `googlemaps` shortcode, an API key must be set.

By default, it will look in your `$_ENV` variables for `GOOGLE_MAP_API`.

However it can be set in `ext_localconf` however you see fit (please don't commit your API key).

```
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['shortcodes']['config']['api']['googlemaps'] = '123';
```

**If you restrict the API key type**, ensure you have the following enabled

- Maps Embed API
- Maps JavaScript API
- Maps Static API

### Iframe

[](#iframe)

`[iframe]`

Allows a generic iframe to be rendered with the passed in URL

```
[iframe: https://typo3.com/ ]

```

**Properties:**

- src
- width
- height
- ratio - iframe ratio in a colon or slash format (e.g. `ratio="4:3"` or `ratio="16/9"`) - rendered as a `data-ratio` attribute
- allowfullscreen
- allow
- frameBorder

### Instagram

[](#instagram)

`[instagram]`

Embeds an Instagram post

```
[instagram=https://www.instagram.com/p/CWI-FeDs-us/ ]

```

### LinkedIn

[](#linkedin)

`[linkedin]`

Embeds an Linked post - ensure the url has `urn:li:activity` or similar in it.

For example:

```
[linkedin=https://www.linkedin.com/feed/update/urn:li:activity:6856570271759949825/ ]

```

**Properties:**

- height
- width
- loading - defaults to `lazy` but can be set to `eager`

**Defaults:**

```
[linkedin=LINK width="100%" height="600"]

```

### Soundcloud

[](#soundcloud)

`[soundcloud]`

Shows a Soundcloud player for a track or artists - can have the size &amp; colour customised. Use the URL

For example:

```
[soundcloud=https://soundcloud.com/cbschmidt/seodriven-331 ]

```

**Properties:**

- url
- maxwidth
- maxheight - can be 166 or 450
- color
- auto\_play
- show\_comments

### Spotify

[](#spotify)

`[spotify]`

Go to Spotify and click on what you want to embed - song, artist, playlist etc.

Click the 3 dots -&gt; Share -&gt; Copy Link

```
[spotify=https://open.spotify.com/track/3gdewACMIVMEWVbyb8O9sY?si=145df8aede6a4b04 ]

```

**Properties:**

- height - can be 80 or 380
- theme - can be 1 or 0 (disables the coloured background)
- loading - defaults to `lazy` but can be set to `eager`

**Defaults:**

```
[spotify=LINK height="380" theme="1"]

```

### X

[](#x)

`[x | twitter | tweet]`

Copy the URL (or the status code) of a tweet

```
[x=https://twitter.com/Interior/status/463440424141459456 ]

```

**Properties:**

Any properties are passed through to the [oembed-api](https://developer.twitter.com/en/docs/twitter-for-websites/timelines/guides/oembed-api), so the list &amp; defaults can be found there

```
[tweet=https://twitter.com/Interior/status/463440424141459456 theme="light"]

```

### Video

[](#video)

`[video]`

The video element outputs an `` with the src of that passed in. It allows an arbitrary URL to a video to be passed in and it will wrap it in a `` for responsive styling purposes.

```
[video=https://www.liquidlight.co.uk/path/to/video ]

```

**Properties**

- code - optional if using the shorthand syntax
- url - optional if using the shorthand syntax
- width
- height
- ratio - video ratio in a colon format (e.g. `ratio="4:3"`) - defaults to `16:9` - rendered as a `data-ratio` attribute for styling
- loading - defaults to `lazy` but can be set to `eager`

### Vimeo

[](#vimeo)

`[vimeo]`

Renders a Vimeo iframe embed. Can take a full URL or code.

```
[vimeo=]

```

See [Video](#video) for properties and use.

### YouTube

[](#youtube)

`[youtube]`

Renders a YouTube iframe embed. Can take a full URL or code.

```
[youtube=https://www.youtube.com/watch?v=JrFFN9lag2w ]

```

See [Video](#video) for properties and use.

Semantic HTML
-------------

[](#semantic-html)

To ensure your HTML remains semantic, shortcode elements will break out of typographic elements and remove any empty sibling elements.

For example, if your editor had entered the following in the RTE:

```
You can watch our latest video [youtube code=123] here
```

You will find the following HTML output

```
You can watch our latest video

here
```

If, once the shortcode is placed after it's original element, the original element would be empty, it gets removed from the HTML.

Elements which the shortcode will break out from:

- pre
- h1
- h2
- h3
- h4
- h5
- h6
- p

The extension will also ensure inline elements (such as `span`, `a` etc.) are closed appropriately.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance57

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Total

19

Last Release

125d ago

Major Versions

1.8.0 → 2.0.02024-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/558888281785ab32c8d72adc6a674a24cb4fef8cc6e115936e41a3f9cdb8de64?d=identicon)[liquidlightuk](/maintainers/liquidlightuk)

![](https://www.gravatar.com/avatar/5a6959c451868af51c41ce566f214bd9ea973046b8a0e9a795cd964ea507f70f?d=identicon)[mikestreety](/maintainers/mikestreety)

---

Top Contributors

[![mikestreety](https://avatars.githubusercontent.com/u/354085?v=4)](https://github.com/mikestreety "mikestreety (131 commits)")[![garett-at-liquidlight](https://avatars.githubusercontent.com/u/105364629?v=4)](https://github.com/garett-at-liquidlight "garett-at-liquidlight (3 commits)")[![Kephson](https://avatars.githubusercontent.com/u/2724872?v=4)](https://github.com/Kephson "Kephson (1 commits)")[![matthew-sheehan](https://avatars.githubusercontent.com/u/98160009?v=4)](https://github.com/matthew-sheehan "matthew-sheehan (1 commits)")[![PatrickVCruz](https://avatars.githubusercontent.com/u/17225796?v=4)](https://github.com/PatrickVCruz "PatrickVCruz (1 commits)")

---

Tags

extensiontypo3typo3-cms-extensiontypo3-extension

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/liquidlight-typo3-shortcodes/health.svg)

```
[![Health](https://phpackages.com/badges/liquidlight-typo3-shortcodes/health.svg)](https://phpackages.com/packages/liquidlight-typo3-shortcodes)
```

###  Alternatives

[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[fluidtypo3/flux

The flux package from FluidTYPO3

152982.2k20](/packages/fluidtypo3-flux)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[derhansen/sf_event_mgt

Configurable event management and registration extension based on ExtBase and Fluid

64313.9k6](/packages/derhansen-sf-event-mgt)[typo3/cms-t3editor

TYPO3 CMS T3Editor - JavaScript-driven editor with syntax highlighting and code completion. Based on CodeMirror.

115.9M50](/packages/typo3-cms-t3editor)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

39488.5k](/packages/wazum-sluggi)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
