scttcper / ngx-codemirror

Codemirror Wrapper for Angular
https://ngx-codemirror.vercel.app
MIT License
282 stars 47 forks source link

How can you use addons with this wrapper? There's no documentation on that... #280

Closed tomadojuice closed 4 years ago

tomadojuice commented 4 years ago

I'd like to use a linter addon from codemirror in my Angular project but I can't figure out how it works. Could someone help me with that?

lf-novelt commented 4 years ago

just add import 'codemirror/addon/selection/active-line'; (or whatever official addon, check in the node_modules/codemirror folder to see all available) in your app.module.ts and then pass the appropriate options to the ngx-codemirror component.