MCPcopy Create free account
hub / github.com/CatMuse/HiNote / enable

Method enable

src/editor/HighlightDecorator.ts:64–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 }
63
64 enable() {
65 this.plugin.registerMarkdownPostProcessor((element, context) => {
66 void this.previewRenderer.processPreview(element, context);
67 });
68
69 this.registerRefreshEvents();
70
71 const highlightPlugin = createEditorHighlightDecorations({
72 plugin: this.plugin,
73 highlightService: this.highlightService,
74 highlightRepository: this.highlightRepository
75 });
76
77 this.highlightPlugin = highlightPlugin;
78 this.plugin.registerEditorExtension([highlightPlugin]);
79 }
80
81 private registerRefreshEvents(): void {
82 const refreshEvents: (keyof HighlightEvents)[] = [

Callers 1

initializeMethod · 0.95

Calls 3

registerRefreshEventsMethod · 0.95
processPreviewMethod · 0.80

Tested by

no test coverage detected