EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
I'm testing this component in an Angular 4 app, therefore I'm using typescript, even though I'm no typescript master.
While trying some options, specifically:
new EasyMDE({
renderingConfig: {
markedOptions: {
sanitize: true,
},
},
But the angular compiler got an error as follows:
renderingConfig: { markedOp...' is not assignable to parameter of type 'Options'.
Types of property 'renderingConfig' are incompatible.
Type '{ markedOptions: { sanitize: boolean; }; }' is not assignable to type 'RenderingOptions'.
Object literal may only specify known properties, and 'markedOptions' does not exist in type 'RenderingOptions'.
and also:
ERROR in /..../node_modules/easymde/types/easymde.d.ts (153,17): Cannot find namespace 'CodeMirror'.
ERROR in /..../node_modules/easymde/types/easymde.d.ts (22,23): Cannot find type definition file for 'codemirror'.
I'm testing this component in an Angular 4 app, therefore I'm using typescript, even though I'm no typescript master.
While trying some options, specifically:
But the angular compiler got an error as follows:
and also:
after changing the local files to
and also, after removing the codemirror references, there were no more errors and it worked as expected.
Is this something in my compiler, or is the typescript support still not fully fleshed out?