better-code-editing icon indicating copy to clipboard operation
better-code-editing copied to clipboard

Integrate with Text mode and Custom HTML block in Gutenberg editor

Open westonruter opened this issue 8 years ago • 3 comments

See https://github.com/WordPress/gutenberg/issues/1733

westonruter avatar Jul 07 '17 05:07 westonruter

Let's de-prioritize this for now.

westonruter avatar Jul 10 '17 17:07 westonruter

Maybe I could help out on this when you reprioritize it.

I maintain a plugin called the HTML Editor Syntax Highlighter. I've written a custom Codemirror syntax mode that highlights everything in the post/page text editor:

  • htmlmixed:
    • html
    • css
    • js
  • shortcodes [squarebrackets/] syntax
  • WP specific things:
    • <!--more-->
    • <!--nextpage-->
    • etc...

Adding this to WP-core for the Gutenberg editor would be awesome!

arniebradfo avatar Sep 04 '17 18:09 arniebradfo

@arniebradfo hi! I can see that I actually reached out to you yesterday on the support forum on this topic: https://wordpress.org/support/topic/html-editor-syntax-highlighter-codemirror-being-added-to-core-in-4-9/

I agree, extending the htmlmixed mode with support for highlighting shortcodes and WordPress-specific comments would be really useful in WordPress, even though the post editor isn't a current target for integrating CodeMirror 4.9. It would still be useful now for when that happens, and it would be useful in the short term for a Gutenberg integration.

Also, CodeMirror should be integrated with the Custom HTML block in Gutenberg, so that's another thing that would be in scope here.

Your insights and experience are appreciated!

westonruter avatar Sep 04 '17 19:09 westonruter