0.1.3 • Published 5 years ago

vnote v0.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Vnote

vnote 是一款基于 Vuemarkdown 文本编辑器,它的风格简约更像是一个便签。

Install

npm i vnote --save-dev
or
yarn add vnote 

Usage

// main.js
import vnote from "vnote";

Vue.use(vnote);
// your page
<v-note @get-text="handler" v-model="text"/>

获取到html字符串后,你可以通过下面的方式展示。

// get-text的参数是解析后的字符串,假设为htmlString,配合github-markdown-css使用
<div class="markdown-body" v-html="htmlString"/>

<script>
import 'github-markdown-css' // vnote依赖库,不需要重复下载
</script>

props

参数类型说明
isPreviewBoolean是否显示预览
widthNumber宽度,默认400
heightNumber高度,默认800

event

事件参数类型说明
get-textString由marked解析出的html字符串
0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago