Open andreasciamanna opened 3 years ago
I forgot to mention, I can't share a repo because this code is part of a bigger project which I can't share.
I may try to create a small project that replicates the issue, but I'm not so sure I can manage (all the legacy code that I'm trying to refactor would make quite hard to do so).
I'm trying to port an old version of a JS component, into a React-based one.
That also means porting the implementation of an ancient version of CM into the one used in this repo.
In a function component, I have this callback:
extraKeys
is defined as such:As soon as I start typing, I get an error:
cm.innerMode is not a function
.I've also tried to get the editor's instance using
editorDidMount
and use that instead ofcm
, but I don't see any difference.This is just one example: I have other pieces of code where it seems I can't access some properties, methods, or helpers of
CodeMirror
.Any help would be welcome.
Thanks!