Skip to content

Inline code highlighting for the inline <code> format #5

Description

@ajaydsouza

Summary

Optional syntax highlighting for inline <code> elements via a rich-text format extension with a language picker.

Details

  • Register a rich-text format (registerFormatType) that wraps/annotates the core inline-code format with a data-wzcbh-lang attribute and a small language dropdown in the format toolbar.
  • Client mode: Prism highlights matching inline elements; server mode: a render_block / the_content pass runs highlight.php on flagged inline spans with remap_token_classes().
  • Off by default via a global setting; inline styling (background, padding) inherited from the active theme.

Why

Technical writing is full of inline references like add_filter() or wp_enqueue_script(); consistent theming between inline and block code is a frequent user request in competing plugins.

Speed to implement: Medium · Usefulness: High · Rank: 5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions