Open Uterr opened 11 months ago
What have you tried?
I am talking about this reference: https://codemirror.net/docs/ref/ first example.
I tried to attach to existing ngx-codemirro by passing existing native element to EditorView constructor new EditorView({ parent: existingCodemirror }) that I got from template from existing ngx-codemirror element with viewChild, but that did nothing
make sure you're looking at the right v5 docs https://codemirror.net/5/
I have created a CodeMirror 6 wrapper for Angular, please have a try. https://github.com/acrodata/code-editor
Codemirror documentation shows a way to create view:
let myView = new EditorView({ doc: '', extensions: [placeholders], parent: document.body })
In this example there is a way to use extensions, but does ngx-codemirror allows to pass extensions? Or is there any way to attach extensions?