Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doxiaodong/ng2-simplemde
angular2 component of https://github.com/sparksuite/simplemde-markdown-editor
https://github.com/doxiaodong/ng2-simplemde
angular markdown ng2-simplemde simplemde
Last synced: 26 days ago
JSON representation
angular2 component of https://github.com/sparksuite/simplemde-markdown-editor
- Host: GitHub
- URL: https://github.com/doxiaodong/ng2-simplemde
- Owner: doxiaodong
- Created: 2017-01-19T10:23:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-07T07:03:30.000Z (about 6 years ago)
- Last Synced: 2024-11-01T12:02:43.245Z (about 1 month ago)
- Topics: angular, markdown, ng2-simplemde, simplemde
- Language: TypeScript
- Homepage:
- Size: 7.12 MB
- Stars: 24
- Watchers: 2
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-angular - ng2-simplemde - angular2 component for Simplemde Markdown Editor. (Uncategorized / Uncategorized)
README
[![Build Status](https://img.shields.io/travis/doxiaodong/ng2-simplemde.svg?style=flat-square)](https://travis-ci.org/doxiaodong/ng2-simplemde)
[![Downloads](https://img.shields.io/npm/dt/ng2-simplemde.svg?style=flat-square)](https://www.npmjs.com/package/ng2-simplemde)
[![Versions](https://img.shields.io/npm/v/ng2-simplemde.svg?style=flat-square)]()
[![License](https://img.shields.io/npm/l/ng2-simplemde.svg?style=flat-square)]()# simplemde-markdown-editor with Angular
# demo
[https://doxiaodong.github.io/ng2-simplemde](https://doxiaodong.github.io/ng2-simplemde)# Usage
* install `npm i ng2-simplemde --save`
```typescript
import { NgModule } from '@angular/core'
import { SimplemdeModule, SIMPLEMDE_CONFIG } from 'ng2-simplemde'
@NgModule({
imports: [
SimplemdeModule.forRoot({
provide: SIMPLEMDE_CONFIG,
// config options 1
useValue: $options1
})
],
bootstrap: [AppComponent]
})
export class AppModule { }
``````html
```
> 1. The final options is `{...$options1, ...$options2}`, `Object.assign({}, $options1, $options2)`
> 2. The `element` option is not useful
> 3. `codemirror` is option set for codemirror, see https://github.com/codemirror/CodeMirror# Webpack
* you should add `style-loader!css-loader` in your webpack config
* If you use angular-cli, you can add `style-loader!css-loader` as pug-loader in https://github.com/angular/angular-cli/issues/1886.# Style
* normal, it use `import 'simplemde/dist/simplemde.min.css'`
* you can use a cdn
```
import { SimplemdeModule, SIMPLEMDE_CONFIG } from 'ng2-simplemde/no-style'
```
and in index.html```
```
* Bundles use don't support this