Documentation
Codemirror
codemirror #
Type: Boolean
, Object
Default: false
This setting allows you to connect Codemirror on the page for code highlighting when adding and editing the code block or in the source mode.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
codemirror: true
});
You can set Codemirror settings, like this:
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
codemirror: {
lineNumbers: true
}
});
See a live example of how Codemirror works with Article.
codemirrorSrc #
Type: Object
Default: false
This setting allows you to specify the instance of Codemirror if it is already initialized in your application.
ArticleEditor('#entry', {
css: '/your-article-dist-path/',
codemirror: true,
codemirrorSrc: MyCodemirrorInstance
});