mueditor

1.1.9 • Public • Published

Mueditor

A simple Vue2.x markdown editor

  • fast
  • simple
  • lightweight

Links

live demo

Install

npm install mueditor

Quick Start

<template>
  <div class="publish-box">
      <Mueditor
        :sync-content="syncPreview"
        :default-content="defaultContent"
        local-storage-name="mue"
        >
      </Mueditor>
      <div class="publish-preview" v-html="html"></div>
    </div>
</template>

<script>
import Mueditor from 'mueditor'
export default {
  components: {
    Mueditor
  },
  data: function () {
    return {
      defaultContent: 'Mueditor demo',
      html: ''
    }
  },
  methods: {
    syncPreview: function (data) {
      this.html = data.html
    }
  }
}
</script>

<style>
.publish-box {
  width: 40rem;
  margin: 0 auto;
}
.publish-preview {
  font-family: monospace, monospace;
}
@media all and (max-width: 768px) {
  .publish-box {
    width: 100%;
  }
}
</style>

Package Sidebar

Install

npm i mueditor

Weekly Downloads

6

Version

1.1.9

License

MIT

Last publish

Collaborators

  • ginuim