Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 711 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 711 Bytes

milkdown-plugin-shiki

Shiki plugin for milkdown. Add support for shiki highlight.

Example Usage

import { Editor } from '@milkdown/core';
import { commonmark } from '@milkdown/preset-commonmark';
import { nord } from '@milkdown/theme-nord';

import { shiki } from 'milkdown-plugin-shiki';

Editor.make()
  .use(nord)
  .use(commonmark)
  .use(await shiki())
  .create();

Options

Editor.use(await shiki({
  theme: 'min-dark',
  cdn: 'https://unpkg.com/shiki/',
  otherLangs: ['tsx', 'jsx']
}))

More infomaion about themes and langs config can be found in shiki docs.