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

APH Prism Syntax Highlighter

外掛說明

Prism is one of the most popular syntax highlighters that widely used by a lot of blog or websites, some of them are popular websites, such as Mozilla, drupal, and SitePoint.

One reason why a lot of websites prefer to use this highlighter is because it’s ability to do custom builds of the language highlighter and plugins you want to be used

This plugin helps you to do all of those tasks and bring this code highlighter to your WordPress easily, provided with many features and user-friendly GUI, make it handy and easy to use.

** Features. **

  • Simple and easy to use
  • Support both Classic and Guttenberg block editor
  • All possible syntax languages provided by Prism
  • Full GUI, don’t need to hardcode parameters
  • Easy to make a custom build. Choose your own language, theme, and some plugins easily
  • Custom container max-height. Useful when displaying long code.
  • Easy to add custom CSS. Useful for responsive design.
  • Easy to edit code that has been written in tinyMCE text editor (screenshot 4)
  • Write and Edit code in place. The textarea of code editor, support tab, and back tab, so you can directly edit or write your code, rather than switch back to your code editor.
  • Load script on demand, load javascript and CSS file of prism highlighter only when needed
  • Ability to override global options and use individual options for each code block
  • Support TinyMCE Visual mode and Text Mode (Quick Tags), it also supports the Quick tags used in the admin comment page (screenshot 5)
  • Use similar pattern with APH Syntax Highlighter and Crayon Syntax Highlighter plugins, so your code will still work using those plugins
  • Language added: Light plain and dark plain

How To Use

After installing the plugin, go to the admin setting Settings > Prism Highlighter to configure the global setting including the highlighter languages you want to load, theme, etc.

In the TinyMCE menu (add or edit post or page), there is a new button that can be used to pop up the code editor, simply copy-paste your code and fill in some options

This new button also can be found at the quick tags of comment editor in the Admin Edit Comments page. This quick tag appears when you edit or reply a comment.

螢幕擷圖

  • Admin Settings
  • Code Editor
  • Edit code on TinyMCE Editor
  • Quick Tags in the Text mode of TinyMCE editor
  • Quick Tags in the admin edit comments page
  • Guttenberg Block

適用於區塊編輯器

這個外掛提供 1 個可供 Gutenberg/區塊編輯器使用的區塊。

  • APH Prism

安裝方式

Install & activate the plugin. Modify some options in the settings page to suits your need.

使用者評論

2023 年 8 月 14 日
Tentei de todas as formas possivel fazer esse plugin funcionar, mas não deu certo. Não tem informação de nada sobre o plugin na propria pagina do plugin, não dá explicação nenhuma de como usar
2021 年 2 月 21 日
I have been looking for a very long time for such a convenient and functional plugin for inserting code into my pages. This plugin is simply amazing! Everything is convenient and comfortable! I edit with pleasure! This plugin is very easy to install and easy to use, and the picture is really beautiful when displayed. I advise everyone to install it! Thank you to the developers for the work done! Respect!
2020 年 5 月 17 日
After searching hours and hours for a code highlighting plugin I ended up with this one and it just works. Thank you! 👌
2019 年 5 月 26 日
Click the icon in classic editor. Complete the pop-up. Click insert. Nothing happens. Brilliant. Don’t waste your time.
閱讀全部 7 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈APH Prism Syntax Highlighter〉的開發相關工作。

參與者

將〈APH Prism Syntax Highlighter〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.5.2 (February 14, 2023)

  • Bug fixes: add missing files

1.5.1 (February 13, 2023)

  • Bug fixes

1.5.0 (February 13, 2023)

  • Bug fixes
  • Update PrismJs to the lastest version (v1.29.0)
  • Add support to PHP 8 (tested on PHP 8.2.0)

1.4.1 (Juli 12, 2020)

  • Bug fixes
  • Add rel=”language-name” to the output
  • Add Plugin’s Custom CSS field in the Block Editor

1.4 (April 29, 2020)

  • Bug fixes
  • Add support to WordPress Guttenberg Block
  • Update prism to the lastest version v.1.20 (29 April 2020)

1.3.1 (February 21, 2019)

  • Bug fixes

1.3 (January 20, 2019)

  • Add support to classic editor on Guttenberg
  • Update PrismJs to the lastest version (v.1.15), including: core, themes, and components

1.2.2 (April 22, 2017)

Bug Fixed: Light Plain and Dark Plain is not responsive

1.2.1 (April 22, 2017)

Minor bug fixed

1.2 (March 18, 2017)

  • Add language: dark plain and light plain
  • Move compiled javascript and css files to wp-content/uploads/aphph
  • Update prism core

1.1.1 (September 26, 2016)

  • Fix sample responsive CSS Code
  • Set default container max-height to 480px

1.1 (September 25, 2016)

  • Ability to set max-height of container. Useful when displaying long code
  • Ability to add custom CSS. Useful for responsive design
  • Now container element has default class: aphph-container
  • Some minor improvements

1.0

Initial Public Release