Title: Melonpan Block &#8211; Code
Author: Alvaro
Published: <strong>2019年8月2日</strong>
Last modified: 2021年3月2日

---

搜尋外掛

![](https://ps.w.org/melonpan-block-code/assets/banner-772x250.png?rev=2132990)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/melonpan-block-code/assets/icon-256x256.png?rev=2147682)

# Melonpan Block – Code

 由[Alvaro](https://profiles.wordpress.org/melonpan/)

[下載](https://downloads.wordpress.org/plugin/melonpan-block-code.2.0.3.zip)

 * [詳情](https://zh-hk.wordpress.org/plugins/melonpan-block-code/#description)
 * [評價](https://zh-hk.wordpress.org/plugins/melonpan-block-code/#reviews)
 *  [安裝](https://zh-hk.wordpress.org/plugins/melonpan-block-code/#installation)
 * [開發](https://zh-hk.wordpress.org/plugins/melonpan-block-code/#developers)

 [支援](https://wordpress.org/support/plugin/melonpan-block-code/)

## 描述

[Demo](https://gutenberg-showcase.melonpan.io/melonpan-block-code) – [Documentation](https://melonpan.io/wordpress-plugins/melonpan-block-code)–
[GitHub](https://github.com/garciaalvaro/melonpan-block-code)

Block to display code, with highlighted syntax, which can be copied to the clipboard.

### Features

The block comes with the following settings:

 * **Code language**: JavaScript, CSS, PHP, etc. [Full list of languages](https://prismjs.com/#languages-list).
 * **Color theme**
 * **Label**: Top left label that can be customized. By default the code language.
 * **Copy button**: Top right button to copy the block content.
 * **Padding**
 * **Border width** and **Border radius**

### Usage

The block can be found inside the blocks inserter menu under the _Melonpan Blocks_
category.
 Once added in the post you can edit its settings on the Editor sidebar
under the Block settings panel. Switch between the previewer and editor views to
edit the code and see its styled output.

## 螢幕截圖

[⌊Block settings panel.⌉⌊Block settings panel.⌉[

Block settings panel.

## Blocks

This plugin provides 1 block.

 *   Melonpan Block – Code

## 安裝

Installation from the WordPress admin.

 1. Log in to the WordPress admin and navigate to _Plugins > Add New_.
 2. Type _Melonpan Block – Code_ in the Search field.
 3. In the results list _Melonpan Block – Code_ plugin should appear, click **Install
    Now** button.
 4. Once it finished installing, click the _Activate_ button.
 5. That’s it, now you can go to any post where Gutenberg is enabled and start using
    the block.

## 評價

There are no reviews for this plugin.

## 貢獻者及開發者

“Melonpan Block – Code” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

 *   [ Alvaro ](https://profiles.wordpress.org/melonpan/)

Melonpan Block – Code 外掛目前已有 1 個本地化語言版本。 感謝[所有譯者](https://translate.wordpress.org/projects/wp-plugins/melonpan-block-code/contributors)
為這個外掛做出的貢獻。

[將 Melonpan Block – Code 外掛本地化為台灣繁體中文版。](https://translate.wordpress.org/projects/wp-plugins/melonpan-block-code)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/melonpan-block-code/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/melonpan-block-code/)，或透過
[RSS](https://plugins.trac.wordpress.org/log/melonpan-block-code/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/melonpan-block-code/)。

## 修改日誌

#### 2.0.3

 * Updated dependencies

#### 2.0.2

 * Updated dependencies

#### 2.0.1

 * Fixed bug where old instances of the block with the copy button enabled were 
   throwing a deprecation warning

#### 2.0.0

 * Major refactor
 * Updated packages

#### 1.1.0

 * Small CSS fix for WP 5.4 version.
 * Improved development environment (updated packages, added linting…)

#### 1.0.1

 * Improved code base.

#### 1.0.0

 * Initial release.

## 其它

 *  Version **2.0.3**
 *  Last updated **5 年之前**
 *  Active installations **10+**
 *  WordPress version ** 5.5 or higher **
 *  Tested up to **5.6.19**
 *  PHP version ** 7.1 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/melonpan-block-code/) 及 [Hungarian](https://hu.wordpress.org/plugins/melonpan-block-code/).
 *  [翻譯成你的語言](https://translate.wordpress.org/projects/wp-plugins/melonpan-block-code)
 * Tags
 * [block](https://zh-hk.wordpress.org/plugins/tags/block/)[block-editor](https://zh-hk.wordpress.org/plugins/tags/block-editor/)
   [code](https://zh-hk.wordpress.org/plugins/tags/code/)[prism](https://zh-hk.wordpress.org/plugins/tags/prism/)
   [syntax highlighting](https://zh-hk.wordpress.org/plugins/tags/syntax-highlighting/)
 *  [進階顯示](https://zh-hk.wordpress.org/plugins/melonpan-block-code/advanced/)

## 評分

No reviews have been submitted yet.

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

[See all reviews](https://wordpress.org/support/plugin/melonpan-block-code/reviews/)

## 貢獻者

 *   [ Alvaro ](https://profiles.wordpress.org/melonpan/)

## 支援

有話想說？需要協助？

 [檢視支援論壇](https://wordpress.org/support/plugin/melonpan-block-code/)