Skip to content

Add a dropdown to switch language in code blocks

Himanshu Kapoor requested to merge 338079-code-block-nodeview into master

What does this MR do?

Allow switching code language in code blocks in content editor using a dropdown.

Issues: #338079 (closed), #334576 (closed)

Screenshots or Screencasts (strongly suggested)

ezgif-2-76e611fab8

How to setup and validate locally (strongly suggested)

  1. Open and edit any wiki page
  2. Click "Edit rich text" to open the page in content editor.
  3. Insert a code block using the toolbar icon or using by typing an input rule like \``jsor```ruby`.
  4. Try changing the language type and see the syntax highlighting change as a result.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #338079 (closed)

Edited by Himanshu Kapoor

Merge request reports