Linux 软件免费装
Banner图

HTML Editor Syntax Highlighter

开发者 nixdns
arniebradfo
rraub
collinprice
更新时间 2024年3月17日 07:35
捐献地址: 去捐款
PHP版本: 4.0 及以上
WordPress版本: 6.5.0
版权: GPLv2 or later
版权网址: 版权信息

标签

editor gutenberg code theme editor plugin editor code editor code highlighter highlighter codemirror syntax syntax highlighting syntax highlighter highlighting html editor text editor code coloring codemirror.js

下载

2.4.4 1.3.0 1.3.1 1.3.2 1.4.0 1.4.2 1.4.3 1.4.4 1.4.6 1.4.7 1.4.8 1.5.0 1.6.0 1.6.1 1.6.2 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.2.5 2.2.6 2.3.0 2.3.1 2.3.3 2.3.4 2.3.5 2.4.0 2.4.1 2.4.2 1.4.1 1.6.3 2.0.1 2.3.2 1.2.1 2.4.3 2.2.3 2.2.4

详情介绍:

Add syntax highlighting in the Classic Post & Page HTML text editor, Gutenberg Code Editor, and Theme & Plugin editors using CodeMirror.js Features If you would like to contribute to this plugin, view the github repo. If you're a regular user of this plugin, please consider taking a short User Experience Survey to provide feedback that will help shape the new version 3.0.

屏幕截图:

  • Quick Settings Panel.
  • Advanced Settings Panel.
  • Syntax highlighting in the Theme/Plugin editor.
  • Example code highlighting.

常见问题:

Does it work with Gutenberg?

Yes! Partially... Since version 2.3.0, it works with the Gutenberg Code Editor, but only the Code Editor, not the Visual Editor. Press Ctrl+Shift+Alt+M / Cmd+Shift+Alt+M to switch between the Visual Editor and the Code Editor. It does not work with blocks in the Gutenberg Visual Editor. This means it does not highlight code in:

  • The Edit as HTML section of every block
  • The Custom HTML block
  • The Shortcode block See the last screenshot for a visual example. It may work with other code related parts of Gutenberg in the future. Track the progress here.

How do I get the Classic Editor back!?

Since WordPress version 5.0, Gutenberg is the default editor. If you want this plugin to work the way it used to, you'll have to download the Classic Editor plugin.

Can I search and replace?

Function: WINDOWS / MAC Start searching: Ctrl-F / Cmd-F Find next: Ctrl-G / Cmd-G Find previous: Shift-Ctrl-G / Shift-Cmd-G Replace: Shift-Ctrl-F / Cmd-Opt-F Replace all: Shift-Ctrl-R / Shift-Cmd-Opt-F Persistent search: Alt-F (dialog doesn't auto-close, Enter to find next, Shift-Enter to find previous) Jump to line: Alt-G

Why are p and br tags are being removed?

Wordpress has a feature called the 'auto p' filter which:

"Changes double line-breaks in the text into HTML paragraphs."
For example, auto p will take some standard post content like this: ` Some long text that has many lines. And paragraphs in it. ` and turn it into something like this: ` Some long text that has many lines And paragraphs in it. ` Like your little brother, it thinks it’s helping, even if it isn’t. What can I do about it?
  • Disable auto p: There are several plugins you can use to disable auto p in the Classic Editor. I’d recommend Toggle wpautop.
  • Show the p tags: The plugin TinyMCE Advanced has an Advanced Option to 'Keep paragraph tags'. This option will still add the "auto p" tags but won't strip them out of the visible code. You can read more about this issues this may cause in this support thread.

Why is my code is being reformatting when I switch to the Visual Editor and back?

The WordPress Visual Editor needs to reformat code in order to function correctly. This is not something that this plugin can fix. You can disable the Visual Editor entirely by going to: Users > Your Profile > Visual Editor: check 'Disable the visual editor when writing'. = Scrollbars are not appearing! / Scroll position is not reset! / Code window is not resizable! You may have the 'Enable full-height editor and distraction-free functionality' turned on. This is a native WordPress feature that changes the scrolling and fullscreen behavior of both the Code Editor and Visual Editor. To Disable Full-height Editor: Go to 'Screen Options' (in the top right of the editor page), then uncheck 'Enable full-height editor and distraction-free functionality' in the Additional Settings section.

How do I use Fullscreen?

The fullscreen button on the top right of the editor will do one of two things depending on the 'Enable full-height editor and distraction-free functionality' setting in your 'Screen Options' (in the top right of the editor page):

  • Full-height Editor Enabled: Toggles the 'distraction free mode'.
  • Full-height Editor Disabled: Toggles the 'fullscreen mode'. Keybindings: F11 will toggle fullscreen on and off, and esc will close fullscreen.

Does it work with Internet Explorer?

Not really... It is partially supported in IE 11. Known bugs are tracked here, but won't be fixed. Anything less that IE 10 isn't even supported by Microsoft anymore. If you are using Internet Explorer you should get a better browser.

更新日志:

2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 2.2.1 2.2.0 2.1.0 2.0.1 2.0.0 1.7.2 1.7.1 1.7.0 1.6.9 1.6.7 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.0 1.5.0 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.2 1.3.0 1.2.1 1.2 Bug fix: 1.1 Bug fix (thanks to collinprice): 1.0 Initial release.