Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caiya/vue-neditor-wrap
基于vue和neditor的双向绑定组件,使用vue-cli3的项目可以直接使用
https://github.com/caiya/vue-neditor-wrap
editor neditor ueditor vue vue-cli3 vue-editor vue-neditor vue-ueditor
Last synced: 4 months ago
JSON representation
基于vue和neditor的双向绑定组件,使用vue-cli3的项目可以直接使用
- Host: GitHub
- URL: https://github.com/caiya/vue-neditor-wrap
- Owner: caiya
- Created: 2018-11-24T03:21:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T18:26:46.000Z (about 2 years ago)
- Last Synced: 2024-10-27T22:06:44.543Z (4 months ago)
- Topics: editor, neditor, ueditor, vue, vue-cli3, vue-editor, vue-neditor, vue-ueditor
- Language: Vue
- Homepage:
- Size: 7.76 MB
- Stars: 242
- Watchers: 9
- Forks: 50
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-neditor-wrap
## Installation
```bash
$ npm i vue-neditor-wrap
```## Quick Start
1. 下载[官方资源文件](https://www.notadd.com/download/neditor/Neditor-next-master.tar.xz)
> 下载完成后放在本地public下,命名为NEditor的文件夹下
2. 引入`VueNeditorWrap`组件
`import VueNeditorWrap from 'vue-neditor-wrap'`
3. 注册组件
```js
components: {
VueNeditorWrap
},
```
4. `v-model`绑定数据
```html
```
```js
data () {
return {
myConfig: {
// 如果需要上传功能,找后端小伙伴要服务器接口地址
serverUrl: '/api/web/upload/ueditor',
// 你的UEditor资源存放的路径,相对于打包后的index.html
UEDITOR_HOME_URL: '/NEditor/',
// 编辑器不自动被内容撑高
autoHeightEnabled: false,
// 初始容器高度
initialFrameHeight: 240,
// 初始容器宽度
initialFrameWidth: '100%',
// 关闭自动保存
enableAutoSave: false
},
content: '',
}
}
```
> 至此你已经可以在页面中看到一个初始化之后的`NEditor`了,并且它已经成功和数据绑定了!

## License
[MIT](http://opensource.org/licenses/MIT)