Render color chips in the Content Editor
What does this MR do and why?
When a code span is written that includes a valid CSS color property, GFM renders a preview swatch to the right of the color. This MR adds support for the Content Editor to render those color chips while editing. Check the GitLab Markdown documentation about color chips.
Screenshots or screen recordings
You can also type color chips on the fly
How to set up and validate locally
- Open a project or group wiki
- Edit a wiki page or create a new one
- Choose
Use new editor
- Write content that includes any valid Hex, RGB(A), or HSL(A) value inside a code span.
- for example:
#ff0033
orrgba(255,0,112,0.5)
- for example:
- The completed code span should have a color swatch rendered to the right of the text that represents the actual color typed.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #332091 (closed)
Edited by Enrique Alcántara