@notadd/ngx-neditor
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

ngx-neditor

基于@notadd/neditor,更现代化的富文本编辑器angular组件

How to use

step-1

安装@notadd/ngx-neditor

  • npm install @notadd/ngx-neditor

安装依赖

  • mkdir -p ./src/assets/node_modules
  • npm install --prefix ./src/assets @notadd/neditor

neditor需在assets/node_modules下安装

step-2

  • 添加NgxNeditorModule到你的AppModule
  import { NgxNeditorModule } from '@notadd/ngx-neditor';

  @NgModule({
    imports: [
        ...
        NgxNeditorModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
  })
  export class AppModule { }

step-3

  • 在你的component中添加ngx-neditor组件
<ngx-neditor [(ngModel)]="content" #neditor [config]="config"></ngx-neditor>

Neditor相关配置见@notadd/neditor

属性

名称 类型 默认值 描述
config Object - 前端配置项说明,见官网
loadingTip string 加载中... 初始化提示文本
disabled boolean false 是否禁用
delay number 50 延迟初始化Neditor,单位:毫秒
neOnReady EventEmitter<NgxNeditorComponent> - 编辑器准备就绪后会触发该事件,并会传递 NgxNeditorComponent 当前实例对象,可用于后续操作。
neOnDestroy EventEmitter - 编辑器组件销毁后会触发该事件
ngModelChange EventEmitter<string> - 编辑器内容发生改变时会触发该事件

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    8
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @notadd/ngx-neditor

Weekly Downloads

8

Version

1.0.2

License

MIT

Unpacked Size

321 kB

Total Files

35

Last publish

Collaborators

  • imeepos2
  • tian-hun
  • lei3265018
  • zuohuadong