npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-editor-interline

v1.1.5

Published

Vue富文本框插件

Downloads

22

Readme

vue-editor-interline

Vue富文本框插件 by Jdes

该插件是基于jsy-editor富文本插件进行二次封装的Vue版本的富文本插件,保留全部功能,同时简化常规配置(主要是图片上传配置优化)

jsy-editor 富文本插件是在 wangEditor 的基础上进行功能扩展之后的富文本框插件

插件部分配置和wangEditor权值不一样,请勿随意重复配置。

重要说明: 使用该富文本框插件,在提交表单之后,务必进行重置操作,即将v-model的值设置为空字符串

API

props

| props | default | type | 说明 | | ---------- | ------------------ | --------- | -------------------------------------------------------------------------------------------- | | v-model | - | - | 绑定值,双向绑定 | | toolBar | 同wangEditor菜单 | Array | 富文本框工具栏,默认值和wangEditor一样 | | action | '' | String | 图片上传地址 | | fileName | files | String | 服务器图片上传接口文件流键名 | | baseUrl | '' | String | 图片上传回显的前缀地址,默认空 | | size | 2 | Number | 图片上传大小限制,单位:MB | | limit | - | Number | 图片上传数量限制,默认无 | | data | {} | Object | 图片上传附加参数 | | merge | false | Boolean | 图片上传参数是否合并到 url | | debug | false | Boolean | 富文本框debugger模式开关,生产环境建议关闭 | | hook | {} | Object | 自定义图片上传钩子函数,配置此项必须覆写customInsert钩子 | | option | {} | Object | wangEditor富文本框配置,权值最高,配置此项后,会覆盖之前单独配置的同名配置,请谨慎使用 |

注意,以上图片上传相关配置(fileName,baseUrl,merge,data),必须在开启服务器上传配置action后才会生效。

富文本默认上传方式(即不配置action)为base64

方法

方法调用需要使用 ref

| 方法名称 | 参数 | 说明 | | -------- | ---- | ---------------- | | clear | - | 清空富文本框内容 |

安装

yarn add vue-editor-interline --save

或者

npm i vue-editor-interline --save

main.js

import vueEditor from 'vue-editor-interline'
import 'vue-editor-interline/lib/vue-editor-interline.css'

Vue.use(vueEditor)

模板语法

<template>
  <div id="app">
    <div>
      <vueEditor
        debug
        ref="vRef"
        v-model="data"
        :option="{fontNames : [
            '宋体',
            '隶书',
            '微软雅黑',
            'Arial',
            'Tahoma',
            'Verdana'
        ]}"
      />
    </div>
  </div>
</template>

<script>
  export default {
    methods: {
      // 调用此方法可以清空富文本内容
      clear() {
        this.$refs.vRef.clear()
      }
    }
  }
</script>

示例

文本模式

image

图片

image