# vue2-prosemirror-markdown

> Plugin to integrate prosemirror with Vue 2

Latest version **0.1.0** (published 2018-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue2-prosemirror-markdown
pnpm add vue2-prosemirror-markdown
yarn add vue2-prosemirror-markdown
bun add vue2-prosemirror-markdown
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-05-14 |
| First published | 2018-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 18.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Maintainers | vhf |

## Links

- npm: https://www.npmjs.com/package/vue2-prosemirror-markdown
- Repository: https://github.com/zazuko/vue2-prosemirror-markdown
- Homepage: https://zazuko.github.com/vue2-prosemirror-markdown
- Issues: https://github.com/zazuko/vue2-prosemirror-markdown/issues
- npm.io page: https://npm.io/package/vue2-prosemirror-markdown

## Dependencies (5)

- [insert-css](https://npm.io/package/insert-css.md) ^2.0.0
- [prosemirror-view](https://npm.io/package/prosemirror-view.md) ^1.3.0
- [prosemirror-state](https://npm.io/package/prosemirror-state.md) ^1.2.0
- [prosemirror-markdown](https://npm.io/package/prosemirror-markdown.md) ^1.0.4
- [prosemirror-example-setup](https://npm.io/package/prosemirror-example-setup.md) ^1.0.1

## Recent versions

- 0.1.0 (latest) — 2018-05-14

## README

# vue2-prosemirror-markdown

Plugin to integrate prosemirror with Vue 2

[![Build Status](https://travis-ci.org/zazuko/vue2-prosemirror-markdown.svg?branch=master)](https://travis-ci.org/zazuko/vue2-prosemirror-markdown)

## Usage

```js
import Vue from 'vue'
import ProseMirror from 'vue2-prosemirror-markdown'
import App from './App.vue'

Vue.use(ProseMirror)

new Vue({ // eslint-disable-line no-new
  el: '#app',
  render: (h) => h(App)
})
```
This installs the component, which can be used as...

```html
<prosemirror
  :initialMarkdown="**hello**"
  mode="all"
  textareaConfig="{name: 'my-textarea'}"
  @contentChangeMarkdown="markdownChangedHandler"/>
```

| parameter         | values                                                                          |
|-------------------|---------------------------------------------------------------------------------|
| `textareaConfig`  | `{name: 'a-string'}` (required)                                                 |
| `mode`            | `all`, `editor` (default), `markdown`                                           |
| `initialMarkdown` | binding `:initialMarkdown="someVar"`, as string: `initialMarkdown="**text**"`   |
| `customClass`     | `'vue-prosemirror'` (default)                                                   |

### Events

| event name               | called with these arguments  |
|--------------------------|------------------------------|
| `contentChange`          | `(val, oldVal)`, both are Objects: `{editor: Node, markdown: String}`              |
| `contentChangeMarkdown`  | `(markdown: String)`           |
| `modeChange`             | `(val: String, oldVal: String)`              |

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# lint all *.js and *.vue files
npm run lint

# run unit tests
npm test
```

For more information see the [docs for vueify](https://github.com/vuejs/vueify).

---
_Source: https://npm.io/package/vue2-prosemirror-markdown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
