[wordpress插件] Code Syntax Block代码语法块

wordpress 插件 文章 2020-03-26 18:00 0 24 全屏看文
评分
100
描述

Code Syntax Block extends the WordPress Block Editor by adding syntax highlighting support to the core code block using the Prism syntax highlighter.

代码语法块通过使用Prism语法突出显示器向核心代码块添加语法突出显示支持来扩展WordPress块编辑器。

The Prism syntax highlighter runs JavaScript loaded on the front-end to parse code blocks and apply syntax markup.

Prism语法突出显示程序运行在前端加载的JavaScript,以解析代码块并应用语法标记。

A CSS file specifies the color and style to apply to that markup.

CSS文件指定要应用于该标记的颜色和样式。

See Prism syntax highlighter for full details.

有关完整的详细信息,请参见 Prism语法荧光笔

Primary development and issues tracked on Github at: https://github.com/mkaz/code

在Github上跟踪的主要开发和问题位于: https://github.com/mkaz/code

-syntax-block

-syntax-block

安装步骤

After installing and activating the plugin, use in the Block Editor by creating a standard code block and selecting a language format.

安装并激活插件后,可通过创建标准代码块并选择语言格式在“块编辑器”中使用。

When creating a new code block, select Code block, and then in the Inspector (Block Controls on the Right) select the language for the code.

在创建新的代码块时,选择“代码块”,然后在检查器(右侧的“块控件”)中选择代码的语言。

The code will not change within the editor, but you’ll see a small label with the selected language.

该代码不会在编辑器中更改,但是您会看到一个带有所选语言的小标签。

On the front-end when the post is being viewed, the code will be color syntax highlighted.

在查看帖子的前端,代码将以彩色语法突出显示。

下载地址
https://downloads.wordpress.org/plugin/code-syntax-block.1.2.2.zip
-EOF-