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

Elementor Syntax Highlighter

外掛說明

THIS PLUGIN IS NO LONGER MAINTAINED, SINCE ELEMENTOR NOW HAS A SYNTAX HIGHLIGHT WIDGET OF ITS OWN.

This Elementor widget allows you to add syntax highlighted code snippets to your content.

The syntax highlighter is implemented using PrismJS.

To use drag the “Highlighted Code” widget from the “Basic” section of the Elementor sidebar onto you post. Then select the language you will be using and fill in the code in the sidebar. You’ll see a preview of what things will look like in the main content panel.

螢幕擷圖

  • Using the highlighter widget
  • Frontend example
  • The Elementor widget closeup
  • The Elementor widget in the sidebar

安裝方式

Make sure Elementor is activated, then activate this plugin. You’ll see the widget under the “Basic” section in the Elementor sidebar.

常見問題集

Q: Can I use another PrismJS theme?
A: Currently only the Okaidia theme is supported. Soon, the selected PrismJS theme will be configurable.

Q: What languages can be highlighted?
A: markup, css, clike, javascript, bash, c, csharp, cpp, fsharp, git, go, graphql, haskell, http, java, javadoc, javadoclike, jsdoc, js-extras, js-templates, json, latex, lisp, makefile, markdown, markup-templating, matlab, nginx, objectivec, perl, php, phpdoc, php-extras, pug, python, r, jsx, tsx, regex, sass, scss, scala, shell-session, sql, twig, typescript

Q: The language I want to highlight isn\’t in the dropdown. How can I select it?
A: Currently only a subset of languages is supported. Soon, the full set of PrismJS languages will be supported.

Q: Does this support any of the PrismJS plugins?
A: Not yet. There are plans to support line numbers and copy paste in the future.

使用者評論

2020 年 4 月 11 日
Plugin works as intended. Perfectly simple. Still lacks few features that would be great (copy/paste button, numbered lines, style settings). In my case I would love to see it having width setting because my website is narrow and I would like to somehow stay without horizontal scroll. Thanks for good plugin
2020 年 3 月 11 日
We wasted 1 day testing plugins but finally found the right one for ELEMENTOR
2020 年 2 月 10 日
The plugin works as advertised in the plugin description. I appreciate your work. It's the one and only working code highlighting for elementor. Looking for future updates with line numbering and the copy feature.
閱讀全部 3 則使用者評論

參與者及開發者

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

參與者

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

對開發相關資訊感興趣?

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