Socket
Socket
Sign inDemoInstall

vue-inscrybmde

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-inscrybmde

InscrybMDE - Markdown Editor component for Vue.js


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Vue-InscrybMDE

Markdown Editor component for Vue.js. Support only vue2.x.

npm package npm downloads

Use Setup

Vue1.x is not supported

Install

npm install vue-inscrybmde --save

Use

  • Internal reference in a single component
<template>
  <markdown-editor v-model="content" ref="markdownEditor"></markdown-editor>
</template>

<script>
  import markdownEditor from 'vue-inscrybmde/src/markdown-editor'

  export default {
    components: {
      markdownEditor
    }
  }
</script>

<style>
  @import '~inscrybmde/dist/inscrybmde.min.css';
</style>
  • Global reference
import Vue from 'vue'
import VueSimplemde from 'vue-inscrybmde'
import 'inscrybmde/dist/inscrybmde.min.css'

Vue.use(VueSimplemde)

Props

propertytypedefaultdescribe
valueStringNoneInitial value, v-model binding can be used
nameStringNoneThe name of the control.
preview-classStringNoneCustom preview style class
autoinitBooleantrueAutomatic initialization
highlightBooleanfalseIs it open to highlight
sanitizeBooleanfalseHTML that does not render input after opening
configsObject{}SimpleMDE's config

Markdown style

e.g. use Github's markdown style

github-markdown-css

install

$ npm install --save github-markdown-css

use

<template>
  <markdown-editor preview-class="markdown-body"></markdown-editor>
</template>

<style>
  @import '~inscrybmde/dist/inscrybmde.min.css';
  @import '~github-markdown-css';
</style>

Highlight

install

$ npm install --save highlight.js

use

<template>
  <markdown-editor :highlight="true"></markdown-editor>
</template>

<script>
  import hljs from 'highlight.js';

  window.hljs = hljs;
</script>

<style>
  @import '~inscrybmde/dist/inscrybmde.min.css';
  @import '~highlight.js/styles/atom-one-dark.css';
  /* Highlight theme list: https://github.com/isagalaev/highlight.js/tree/master/src/styles */
</style>

Editor Theme (inscrybmde-theme-base)

e.g. use inscrybmde-theme-base theme

install

$ npm install --save inscrybmde-theme-base

use

<style>
  @import '~inscrybmde-theme-base/dist/inscrybmde-theme-base.min.css';
  /* no need import inscrybmde.min.css */
</style>

Configuration

Configuration is based on InscrybMDE config

Examples

Dependencies

Licence

vue-inscrybmde is open source and released under the MIT Licence.

Copyright (c) 2018 F-loat

Keywords

FAQs

Last updated on 20 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc