@notadd/ngx-neditor
npm i @notadd/ngx-neditor

@notadd/ngx-neditor

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

by notadd

1.0.2 (see all)License:MITTypeScript:Built-In
npm i @notadd/ngx-neditor
Readme

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

属性

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

Downloads/wk

12

GitHub Stars

50

LAST COMMIT

3yrs ago

MAINTAINERS

4

CONTRIBUTORS

1

OPEN ISSUES

1

OPEN PRs

1
VersionTagPublished
1.0.2
latest
4yrs ago
No alternatives found
No tutorials found
Add a tutorial