{"_id":"@bitheral/vue-easymde","name":"@bitheral/vue-easymde","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@bitheral/vue-easymde","version":"2.0.0","description":"EasyMDE - Markdown Editor component for Vue.js","main":"src/index.vue","typings":"types/index.d.ts","scripts":{"build":"vue-cli-service build --target lib --name VueEasyMDE src/index.vue","postbuild":"node hack.js","lint":"vue-cli-service lint"},"keywords":["Vue","SimpleMDE","EasyMDE","Markdown"],"author":{"name":"Bitheral","email":"me@bitheral.net"},"repository":{"type":"git","url":"git+https://github.com/Bitheral/vue-easymde.git"},"license":"MIT","dependencies":{"@bitheral/easymde":"^2.19.1","marked":"^5.0.2"},"devDependencies":{"@vue/cli-plugin-babel":"^5.0.8","@vue/cli-plugin-eslint":"^5.0.8","@vue/cli-service":"^5.0.8","@vue/eslint-config-airbnb":"^5.3.0","babel-eslint":"^10.1.0","eslint":"^7.32.0","eslint-plugin-vue":"^7.18.0","vue-loader":"^15.9.8","vue-template-compiler":"^2.6.14"},"gitHead":"6aa52ffe3032dd24933a33fa48d376a5627acb8a","bugs":{"url":"https://github.com/Bitheral/vue-easymde/issues"},"homepage":"https://github.com/Bitheral/vue-easymde#readme","_id":"@bitheral/vue-easymde@2.0.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.1","dist":{"integrity":"sha512-YOuU8M+K9oByBnWW2ZeGvQCrSl7P/6omX4MoONrDL6L5DDqzRx/+4mq5c1Uy8tq/drOX2E4TgkGwWUIJJKytOQ==","shasum":"12427b76dc8af3f4a6bfe303072da745451a5c55","tarball":"https://registry.npmjs.org/@bitheral/vue-easymde/-/vue-easymde-2.0.0.tgz","fileCount":10,"unpackedSize":28714,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+BGqkyf0AukG9yTu+DBnD8uqo3xxUF2ztVVK0TILv0AiAKMjxASdvGt3KfJ49JEaaV5wL5VCGgpgsOyFSnVpF+Ag=="}]},"_npmUser":{"name":"bitheral","email":"me@bitheral.net"},"directories":{},"maintainers":[{"name":"bitheral","email":"me@bitheral.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-easymde_2.0.0_1684668027786_0.8490168221211278"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-21T11:20:27.687Z","2.0.0":"2023-05-21T11:20:27.943Z","modified":"2023-05-21T11:20:28.264Z"},"maintainers":[{"name":"bitheral","email":"me@bitheral.net"}],"description":"EasyMDE - Markdown Editor component for Vue.js","homepage":"https://github.com/Bitheral/vue-easymde#readme","keywords":["Vue","SimpleMDE","EasyMDE","Markdown"],"repository":{"type":"git","url":"git+https://github.com/Bitheral/vue-easymde.git"},"author":{"name":"Bitheral","email":"me@bitheral.net"},"bugs":{"url":"https://github.com/Bitheral/vue-easymde/issues"},"license":"MIT","readme":"# Vue-EasyMDE\r\n\r\n> Markdown Editor component for Vue.js. Support only Vue2.x.\r\n\r\n[![npm package](https://img.shields.io/npm/v/vue-easymde.svg)](https://npmjs.org/package/vue-easymde)\r\n[![npm downloads](http://img.shields.io/npm/dm/vue-easymde.svg)](https://npmjs.org/package/vue-easymde)\r\n\r\n>[readme на русском](README.ru.md)\r\n\r\n# Use Setup\r\n\r\n> No longer support Vue1.x, you can modify to use\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install vue-easymde --save\r\n\r\nyarn add vue-easymde\r\n```\r\n\r\n## Use\r\n\r\n- Internal reference in a single component\r\n\r\n```vue\r\n<template>\r\n <vue-easymde v-model=\"content\" ref=\"markdownEditor\" />\r\n</template>\r\n\r\n<script>\r\n import VueEasymde from \"vue-easymde\";\r\n\r\n export default {\r\n  components: {\r\n    VueEasymde\r\n  }\r\n };\r\n</script>\r\n\r\n<style>\r\n @import \"~easymde/dist/easymde.min.css\";\r\n</style>\r\n```\r\n\r\n- Global reference\r\n\r\n```javascript\r\nimport Vue from \"vue\";\r\nimport VueEasymde from \"vue-easymde\";\r\nimport \"easymde/dist/easymde.min.css\";\r\n\r\nVue.component('vue-easymde', VueEasymde)\r\n```\r\n\r\n## Props\r\n\r\n| property      | type    | default | describe                                      |\r\n| ------------- | ------- | ------- | --------------------------------------------- |\r\n| value         | String  | None    | Initial value, v-model binding can be used    |\r\n| name          | String  | None    | The name of the control.                      |\r\n| preview-class | String  | None    | Custom preview style class                    |\r\n| autoinit      | Boolean | true    | Automatic initialization                      |\r\n| highlight     | Boolean | false   | Is it open to highlight                       |\r\n| sanitize      | Boolean | false   | HTML that does not render input after opening |\r\n| configs       | Object  | {}      | [EasyMDE's config](#configuration)          |\r\n| previewRender | Function | - | configs.previewRender |\r\n\r\n## Events\r\n\r\n| event | describe | arguments |\r\n| ----| ----- | ---- |\r\n| update:modelValue | Triggered when the Input value changes | value |\r\n| blur | Triggered when the Input loses focus | value |\r\n| initialized | Triggered when initialization is complete | easymde |\r\n\r\n## Methods\r\n\r\n``` js\r\nthis.$refs.markdownEditor.easymde.togglePreview();\r\n```\r\n\r\n[examples/index.vue](./examples/index.vue)\r\n\r\n[simplemde.js](https://github.com/sparksuite/simplemde-markdown-editor/blob/6abda7ab68cc20f4aca870eb243747951b90ab04/src/js/simplemde.js#L1908-L2026)\r\n\r\n## Markdown style\r\n> e.g. use Github's markdown style\r\n\r\n[github-markdown-css](https://github.com/sindresorhus/github-markdown-css)\r\n\r\n### install\r\n```bash\r\n$ npm install --save github-markdown-css\r\n\r\n$ yarn add github-markdown-css\r\n```\r\n\r\n### use\r\n```vue\r\n<template>\r\n <vue-easymde preview-class=\"markdown-body\" />\r\n</template>\r\n\r\n<style>\r\n @import \"~easymde/dist/easymde.min.css\";\r\n @import \"~github-markdown-css\";\r\n</style>\r\n```\r\n\r\n## Highlight\r\n\r\n### install\r\n```\r\n$ npm install --save highlight.js\r\n\r\n$ yarn add highlight.js\r\n```\r\n\r\n### use\r\n```vue\r\n<template>\r\n <vue-easymde :highlight=\"true\" />\r\n</template>\r\n\r\n<script>\r\n import hljs from \"highlight.js\";\r\n\r\n window.hljs = hljs;\r\n</script>\r\n\r\n<style>\r\n @import \"~easymde/dist/easymde.min.css\";\r\n @import \"~highlight.js/styles/atom-one-dark.css\";\r\n /* Highlight theme list: https://github.com/isagalaev/highlight.js/tree/master/src/styles */\r\n</style>\r\n```\r\n\r\n## Editor Theme ([simplemde-theme-base](https://github.com/xcatliu/simplemde-theme-base/wiki/List-of-themes))\r\n\r\n> e.g. use simplemde-theme-base theme\r\n\r\n### install\r\n```\r\n$ npm install --save simplemde-theme-base\r\n\r\n$ yarn add simplemde-theme-base\r\n```\r\n\r\n### use\r\n```vue\r\n<style>\r\n  @import \"~simplemde-theme-base/dist/simplemde-theme-base.min.css\";\r\n  /* no need import simplemde.min.css */\r\n</style>\r\n```\r\n\r\n## Configuration\r\n> Configuration is based on EasyMDE [config](https://github.com/Ionaru/easy-markdown-editor)\r\n\r\n- [English](doc/configuration_en.md)\r\n- [Русский](doc/configuration_ru.md)\r\n- [中文](doc/configuration_zh.md)\r\n\r\n## Examples\r\n\r\n- [Simple Example](./examples/index.vue)\r\n- [Nuxt Example](./examples/nuxt)\r\n- [Demo Page](https://NikulinIlya.github.io/vue-easymde/)\r\n- [Demo Source](https://github.com/NikulinIlya/vue-easymde/tree/gh-pages)\r\n\r\n## Dependencies\r\n\r\n- [EasyMDE](https://github.com/Ionaru/easy-markdown-editor)\r\n\r\n## Licence\r\n\r\nvue-easymde is open source and released under the MIT Licence.\r\n\r\nCopyright (c) 2018 F-loat\r\n\r\nCopyright (c) 2019 Ilya Nikulin\r\n","readmeFilename":"README.md"}