同步操作将从 Notadd/ngx-neditor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
基于@notadd/neditor,更现代化的富文本编辑器angular组件
@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下安装
import { NgxNeditorModule } from '@notadd/ngx-neditor';
@NgModule({
imports: [
...
NgxNeditorModule
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
ngx-neditor
组件<ngx-neditor [(ngModel)]="content" #neditor [config]="config"></ngx-neditor>
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
config | Object |
- | 前端配置项说明,见官网 |
loadingTip | string |
加载中... |
初始化提示文本 |
disabled | boolean |
false |
是否禁用 |
delay | number |
50 |
延迟初始化UEditor,单位:毫秒 |
neOnReady | EventEmitter<UEditorComponent> |
- | 编辑器准备就绪后会触发该事件,并会传递 NgxNeditorComponent 当前实例对象,可用于后续操作。 |
neOnDestroy | EventEmitter |
- | 编辑器组件销毁后会触发该事件 |
ngModelChange | EventEmitter<string> |
- | 编辑器内容发生改变时会触发该事件 |
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。