Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: CodeMirror.defineMode is not a function #293

Open
wiggisser opened this issue Dec 19, 2020 · 0 comments
Open

TypeError: CodeMirror.defineMode is not a function #293

wiggisser opened this issue Dec 19, 2020 · 0 comments

Comments

@wiggisser
Copy link

wiggisser commented Dec 19, 2020

I'm using angular 9, thus I installed

npm install @ctrl/ngx-codemirror@3 codemirror

which installed @crtl/[email protected] and [email protected]

Then I included the module like described in the docs, ie I added

import { CodemirrorModule } from '@ctrl/ngx-codemirror';

 // add to imports:
  imports: [
    BrowserModule,
    FormsModule,
    CodemirrorModule,
    ...
  ]

to my app.module.ts and

import 'codemirror/mode/javascript/javascript';
import 'codemirror/mode/markdown/markdown';

to the top of my main.ts

Now when the webapp tries to start I get the above error in the browser console, pointing to javascript.js (ie the mode file)

Am I missing something? Without importing any modes it works, but well, it's just half the fun ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant