Skip to content

Latest commit

 

History

History

highlight

@codeimage/highlight

Latest release Version Built with CodeMirror6

Custom CodeMirror6 editor themes for @codeimage/app

CodeImage editor themes are made by the internal createTheme api function.

Each theme must implement the CustomTheme interface that provides binding for CodeMirror editor theme and the style for the theme switcher preview.

How to create a new theme

To create a new theme, you need to run the generate:theme command.

$ pnpm generate:theme

It will ask you for a name of for the theme.

Warning Theme name must be in lower camel case.
ex. githubDark is a valid theme name.

The script will do the following:

  • Creates a new folder in the src/lib/themes folder with the name you used.
  • Generate a index.ts and {{yourTheme}}.ts file in the new folder.
  • Automatically add the export and typesVersion entry in the package.json

Available themes

Feature Name
Arc Dark Arc Dark
Aura Dark Aura Dark
Coldark Cold Coldark Cold
Coldark Dark Coldark Dark
Dracula Dracula
Duotone Dark Duotone Dark
Duotone Sea Duotone Sea
Holi dark Holi dark
One Light One Light
Material Light Material Light
Material Ocean Material Ocean
Material Palenight Material Palenight
Material Volcano Material Volcano
Night owl Night Owl
One Dark One Dark
Synthwave84 Synthwave 84
VSCodeDark VSCode Dark