vue2-prosemirror-markdown

0.1.0 • Public • Published

vue2-prosemirror-markdown

Plugin to integrate prosemirror with Vue 2

Build Status

Usage

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...

<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

# 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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    6

Package Sidebar

Install

npm i vue2-prosemirror-markdown

Weekly Downloads

6

Version

0.1.0

License

MIT

Unpacked Size

18.9 kB

Total Files

9

Last publish

Collaborators

  • vhf