MarkGleam 本地处理 · 免费使用

代码转图片

代码模式直接接收源码,并自动包装为高亮代码块。选择正确的语言后,再调整主题、字号和画布。

使用步骤

  1. 粘贴代码并选择语言
  2. 调整主题、字号和背景
  3. 检查高亮后导出图片

使用限制

语法高亮依赖语言标识;未支持的语言会自动检测,选择错误的已支持语言则可能得到不准确的高亮,但不会改动源码。

输入示例

type ExportFormat = 'png' | 'webp' | 'svg'

interface ExportOptions {
  format: ExportFormat
  scale: 1 | 2 | 3
}

const describeExport = ({ format, scale }: ExportOptions) =>
  `Export ${format.toUpperCase()} at ${scale}x`

English · 日本語