Embedded snippets: Add Markdown preview

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Description

Our new embedded snippets feature, available with 10.8, allows to put GitLab snippets on any website.
When working with Markdown snippets, one thing that is missing is the option to see the rendered Markdown preview.

Screen_Shot_2018-05-26_at_10.59.58_PM

Proposal

  • Snippets based on Markdown remain to be shown in source code view by default, as is
  • Add option to display snippets based on Markdown as Preview
  • A new button group in the embedded snippet header allows to switch between Source and Preview ("Rendered file"), similar to the file viewer on the snippet page

Design proposal

  • Draft by myself, subject to finalize before implementation
  • New icon SVGs used: code, doc-text (in place: doc-code, download)

embedded-snippet-ui

Links / references

Example snippet

  • GitLab Snippet page
  • Embedded snippet example on GitLab Pages

cc @haseebeqx

Edited Sep 04, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading