Title: CodePen Embed Block
Author: Chris Coyier
Published: <strong>2020 年 1 月 17 日</strong>
Last modified: 2025 年 7 月 1 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/codepen-embed-block/assets/icon-256x256.jpg?rev=2471014)

# CodePen Embed Block

 作者：[Chris Coyier](https://profiles.wordpress.org/chriscoyier/)

[下载](https://downloads.wordpress.org/plugin/codepen-embed-block.zip)

 * [详情](https://cn.wordpress.org/plugins/codepen-embed-block/#description)
 * [评价](https://cn.wordpress.org/plugins/codepen-embed-block/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/codepen-embed-block/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/codepen-embed-block/#developers)

 [支持](https://wordpress.org/support/plugin/codepen-embed-block/)

## 描述

[CodePen](https://codepen.io) 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.

## 屏幕截图

[⌊Adding a CodePen Embed block.⌉⌊Adding a CodePen Embed block.⌉[

Adding a CodePen Embed block.

[⌊The block with all the options.⌉⌊The block with all the options.⌉[

The block with all the options.

## 区块

该插件提供了 1 个区块.

 *   CodePen Embed Embeds CodePen pens

## 安装

Install from the WordPress Plugin Directory.

## 常见问题

### Why is this useful?

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

## 评价

![](https://secure.gravatar.com/avatar/d1a79b946f31874fa60f2b234b9ac8add41a2049281523e8a96698354406f8e6?
s=60&d=retro&r=g)

### 󠀁[Super for custom code embeds](https://wordpress.org/support/topic/super-for-custom-code-embeds/)󠁿

 [Deniss](https://profiles.wordpress.org/cms24/) 2022 年 5 月 4 日

Good module for custom code embeds from CodePen.

![](https://secure.gravatar.com/avatar/3d03ea1bfb9ecee0ee6ec90857c2e62be4dbc83d9e2f9e1ee24618e9dde6a3bb?
s=60&d=retro&r=g)

### 󠀁[Great tutorial tool](https://wordpress.org/support/topic/great-tutorial-tool/)󠁿

 [Georgi Popov](https://profiles.wordpress.org/magadanski_uchen/) 2022 年 1 月 20
日

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!

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/codepen-embed-block/reviews/)

## 贡献者及开发者

「CodePen Embed Block」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Chris Coyier ](https://profiles.wordpress.org/chriscoyier/)
 *   [ Andrew Taylor ](https://profiles.wordpress.org/andrewtaylor-1/)

「CodePen Embed Block」插件已被翻译至 2 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/codepen-embed-block/contributors)
为本插件所做的贡献。

[帮助将「CodePen Embed Block」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/codepen-embed-block)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/codepen-embed-block/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/codepen-embed-block/)，或通过[RSS](https://plugins.trac.wordpress.org/log/codepen-embed-block/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/codepen-embed-block/)。

## 更新日志

#### 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.0**
 *  最后更新：**11 月前**
 *  活跃安装数量 **700+**
 *  WordPress 版本 ** 5.1 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 7.2 或更高版本 **
 *  语言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/codepen-embed-block/) 、 
   [English (US)](https://wordpress.org/plugins/codepen-embed-block/) 和 [French (France)](https://fr.wordpress.org/plugins/codepen-embed-block/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/codepen-embed-block)
 * 标签
 * [code](https://cn.wordpress.org/plugins/tags/code/)[codepen](https://cn.wordpress.org/plugins/tags/codepen/)
   [embed](https://cn.wordpress.org/plugins/tags/embed/)[gutenberg](https://cn.wordpress.org/plugins/tags/gutenberg/)
 *  [高级视图](https://cn.wordpress.org/plugins/codepen-embed-block/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/codepen-embed-block/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/codepen-embed-block/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/codepen-embed-block/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/codepen-embed-block/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/codepen-embed-block/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/codepen-embed-block/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/codepen-embed-block/reviews/)

## 贡献者

 *   [ Chris Coyier ](https://profiles.wordpress.org/chriscoyier/)
 *   [ Andrew Taylor ](https://profiles.wordpress.org/andrewtaylor-1/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/codepen-embed-block/)