New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nelson-editor

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nelson-editor

Nelson's editor

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

介绍

NE是一款简洁的基于react、支持服务端渲染的富文本编辑器

在线demo:戳此

demo中:后端采用koa等;前端采用React+React-Router+Redux+CSS Module等。

安装

npm install nelson-editor --save-dev

使用

import NEditor from 'nelson-editor';

//获取NEditor组件实例
const Editor = NEditor.Editor;
//获取NEditor样式,用于页面显示
const EditorStyle = NEditor.Style;

//安装组件
<Editor ref={e => this.editor = e}
        uploadPictureConfig={{
        action: '/api/uploadPicture',//本地图片上传地址
        format: this.format//本地图片上传后的url格式化方法
        }}/>
        
//用于显示
<div className={style['editor-container']}>
     <article ref={e => this.showContent = e} className={EditorStyle['editor-container']}>
     </article>
</div> 

API

Editor.val(value:string) 获取/设置编辑器的值

value为空则返回编辑器的值,不为空则设置编辑器的值。

Keywords

markdown

FAQs

Package last updated on 22 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts