import Prism from 'prismjs' ; import type { PluginContext , PluginInfo } from '@toast-ui/editor' ; import { codeSyntaxHighlightPlugin } from '@/plugin' ; import { PrismJs } from '@t/index' ; import '@/prismjs-langs' ; import '@/css/plugin.css' ; if ( typeof window !== undefined ) { window . Prism = window . Prism || { } ; window . Prism . manual = true ; } export default function plugin ( context ) { return codeSyntaxHighlightPlugin ( context , { highlighter : Prism as PrismJs } ) ; }