[WordPress] 外掛分享: MarkDown Block

首頁外掛目錄 › MarkDown Block
WordPress 外掛 MarkDown Block 的封面圖片
全新外掛
安裝啟用
尚無評分
325 天前
最後更新
問題解決
WordPress 6.4+ PHP 8.2+ v1.1.0 上架:2025-04-12

內容簡介

### 外掛功能總結
這個外掛具有使用SimpleMDE編輯Markdown文件的功能,並透過marked解析Markdown文件,將其指定給轉換後的HTML元素特定區塊。具有客製化樣式功能,使用者可以根據不同區塊進行Markdown文件風格設計,提供廣泛的樣式選擇。

- 透過Markdown解析轉換成HTML元素時,將應用下列區塊:
- H元素: itmar/design-title
- P元素: core/paragraph
- PRE元素: itmar/code-highlight
- IMG元素: core/image
- BLOCKQUOTE元素: core/quote
- LI元素: core/list
- TABLE元素: core/table
- H元素也會生成為目錄,根據層級顯示巢狀項目。
- 這個外掛不需要外部資源(所有腳本和樣式均在本地包含)。

### 問題與答案
1. 這個外掛有哪些功能?
- 使用SimpleMDE編輯Markdown文件
- 透過marked解析Markdown文件,指定區塊給HTML元素
- 客製化Markdown文件樣式功能

2. 透過Markdown解析轉換成HTML元素時,會應用哪些區塊?
- H元素: itmar/design-title
- P元素: core/paragraph
- PRE元素: itmar/code-highlight
- IMG元素: core/image
- BLOCKQUOTE元素: core/quote
- LI元素: core/list
- TABLE元素: core/table

3. 外掛是否需要使用外部資源?
- 這個外掛不需要外部資源,所有腳本和樣式均在本地包含。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「MarkDown Block」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This block has the function of editing Markdown documents using SimpleMDE, and by parsing Markdown documents using marked, it can assign specific blocks to the converted HTML elements.
This function allows users to customize Markdown documents using the styling functions of the corresponding blocks, allowing for a wide range of styling.
The following are the blocks that are applied when Markdown documents are parsed into HTML elements.

H element: itmar/design-title
P element: core/paragraph
PRE element: itmar/code-highlight
IMG element: core/image
BLOCKQUOTE element: core/quote
LI element: core/list
TABLE element: core/table

The H element is also generated as a table of contents, and has the function of displaying nested items according to level.
This plugin does not require any external resources (all scripts and styles are included locally)
Related Links

markdown-block:Github
block-class-package:GitHub
block-class-package:Packagist
itmar-block-packages:npm
itmar-block-packages:GitHub

Arbitrary section

PHP class management is now done using Composer.
GitHub
Packagist

I decided to make functions and components common to other plugins into npm packages, and install and use them from npm.
npm
GitHub

External services

This plugin uses EasyMDE to implement the editing function of Markdown documents. This is an open source JavaScript library provided under the MIT license.
EasyMDE LICENSE
EasyMDE comes with a spell check feature.
When using this feature, it will try to load an external file (en_US.aff / en_US.dic) from a CDN. To avoid this, this plugin sets spellChecker: false, when instantiating EasyMDE, so that the external file will not be loaded.
This plugin uses marked to parse Markdown documents and convert them to HTML elements. This is an open source JavaScript library provided under the MIT license.
marked LICENSE

延伸相關外掛

文章
Filter
Apply Filters
Mastodon