CodePen Embed Block

Descrição

CodePen is an online code editor for front-end development. You build things (we call them Pens) with HTML, CSS, and JavaScript, and the languages and libraries that go along with those. Any Pen can be embedded on another site, making them useful for blog posts, documentation, forums, etc.

This block makes it easy to embed them. While oEmbed (just paste in a Pen URL!) also works for CodePen embeds in the block editor, this plugin allows for much more control, like setting the the height, theme, and default tabs.

Ecrãs

Blocos

Este plugin inclui 1 bloco.

  • CodePen Embed Embeds CodePen pens

Instalação

Install from the WordPress Plugin Directory.

Perguntas frequentes

Why is this useful?

It’s helpful for embedding Pens you build (or others have built) on CodePen on your own WordPress site.

Avaliações

20 Janeiro, 2022
I write web development tutorials in my blog and have tried many syntax highlighter options for code snippets in the past. I recently decided to give Codepen a try and this plugin is surely the best way to embed and configure those!
Ler todas as 2 avaliações

Contribuidores e programadores

“CodePen Embed Block” é software de código aberto. As seguintes pessoas contribuíram para este plugin:

Contribuidores

“CodePen Embed Block” foi traduzido para 2 locales. Obrigado aos tradutores pelas suas contribuições.

Traduza o “CodePen Embed Block” para o seu idioma.

Interessado no desenvolvimento?

Consulte o código, consulte o repositório SVN, ou subscreva o registo de alterações por RSS.

Registo de alterações

1.0

  • Initial release

1.0.2

  • Added editable option

1.0.3

  • Tested up to WordPress 6.3.1

1.1.0

  • Added new setting for default theme ID

1.2.0

  • Rewritten using @wordpress/blocks builder
  • Update RegEx to support 2.0 editor URLs

1.2.1

  • Sanitize and escape the default theme ID setting to prevent stored cross-site scripting.

1.3.0

  • Settings CodePen Embed now has a Default Theme ID and an Override Theme ID, like the shortcode plugin. The override applies to every embed at render time, and the block editor shows when it is in effect.
  • Leave a block’s Pen Theme ID blank to use the Default Theme ID.
  • Fixes from WordPress Plugin Check: consistent text domain and function prefixes, “Tested up to” only in the readme, editor script dependencies read from the build.

1.3.1

  • Build tooling updated to @wordpress/scripts 37. The editor script now uses WordPress’s bundled React JSX runtime, so the plugin requires WordPress 6.6 or newer.