Coder Social home page Coder Social logo

vue-weui-ueditor's Introduction

vue-weui-ueditor

A Wrapper of UEditor for vue 2.xwith mp.weixin weuiUI

Intro

Weui-ueditor is a simple and beautiful rich editor based on ueditor, and with weui.

Demo

Install

$ npm i vue-weui-ueditor --S

Or using cnpm

$ cnpm i vue-weui-ueditor --S

Usage

<template>
	<div id="app">
		<weuiUEditor></weuiUEditor>
	</div>
</template>
<script>
	import weuiUEditor from 'vue-weui-ueditor';

	import 'vue-weui-ueditor/dist/vue-weui-ueditor.min.css';
	export default {
		name: 'app',
		components: {
			weuiUEditor
		}
	};
</script>

Attributes

param description type optional default
config 见下表 Object null, object {}
content 父子间传递的编辑器内容 string - ''
editorTopOffset 滚动的时候编辑器的工具条浮层距离 Number - 0
on-editor-ready 编辑器初始化回调 Function null null

Method

name description params
setContent 设置编辑器内容 (String html)
execCommand 执行编辑器cmd,用于拓展 UEditor API doc (String cmdName, argv)
getContent 获取编辑内容. type['Content'(defalut), 'AllHtml', 'PlainTxt'],当默认值时,可以通过参数定义编辑器内置的判空规则 (String type, Function fn)

Config

key description type optional default
selectOptions 下拉的选择按钮 Object {'rowspacing', 'lineheight', 'orderedlist', 'unorderedlist', 'fontsize'} 见optional

待扩展

License

This is available under [the MIT license](https://opensource.org/licenses/mit-license.php.

vue-weui-ueditor's People

Contributors

yiwuyu avatar

Watchers

James Cloos avatar M avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.