MCPcopy Create free account
hub / github.com/resend/react-email / onLanguageLoaded

Function onLanguageLoaded

packages/editor/src/extensions/prism-plugin.ts:143–149  ·  view source on GitHub ↗
(language: string)

Source from the content-addressed store, hash-verified

141 let pluginView: EditorView | null = null;
142
143 const onLanguageLoaded = (language: string) => {
144 if (pluginView) {
145 pluginView.dispatch(
146 pluginView.state.tr.setMeta(PRISM_LANGUAGE_LOADED_META, language),
147 );
148 }
149 };
150
151 const prismjsPlugin: Plugin<DecorationSet> = new Plugin({
152 key: new PluginKey('prism'),

Callers 1

getDecorationsFunction · 0.85

Calls 1

dispatchMethod · 0.80

Tested by

no test coverage detected