MCPcopy Create free account
hub / github.com/uiwjs/react-codemirror / constructor

Method constructor

extensions/hyper-link/src/index.ts:98–105  ·  view source on GitHub ↗
(view: EditorView)

Source from the content-addressed store, hash-verified

96 decorator?: MatchDecorator;
97 decorations: DecorationSet;
98 constructor(view: EditorView) {
99 if (regexp) {
100 this.decorator = linkDecorator(regexp, match, handle, anchor);
101 this.decorations = this.decorator.createDeco(view);
102 } else {
103 this.decorations = hyperLinkDecorations(view, anchor);
104 }
105 }
106 update(update: ViewUpdate) {
107 if (update.docChanged || update.viewportChanged) {
108 if (regexp && this.decorator) {

Callers

nothing calls this directly

Calls 2

linkDecoratorFunction · 0.85
hyperLinkDecorationsFunction · 0.85

Tested by

no test coverage detected