网站首页 > 基础教程 正文
ngx-ueditor 百度web前端研发部出品的 UEditor 风格 Angular 桌面端编辑器。
UEditor是由百度团队开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点。
特性
- 懒加载 ueditor.all.js 文件。
- 支持ueditor事件监听与移除
- 支持语言切换
- 支持ueditor实例对象直接访问。
- 支持二次开发。
安装
npm i ngx-ueditor -S
把UEditorModule模块导入到你的项目中
import { NgModule } from '@angular/core';
import { UEditorModule } from 'ngx-ueditor';
@NgModule({
imports: [
UEditorModule.forRoot({
js: [
`./assets/ueditor/ueditor.config.js`,
`./assets/ueditor/ueditor.all.min.js`,
],
// 默认前端配置项
options: {
UEDITOR_HOME_URL: './assets/ueditor/'
}
})
],
})
export class AppModule { }
使用
<ueditor [(ngModel)]="html"
[config]="{ wordCount: true }"
[loadingTip]="'加载中……'"
(onReady)="_ready($event)"
(onDestroy)="_destroy()"
(ngModelChange)="_change($event)"></ueditor>
完整实例
<ueditor [(ngModel)]="full_source" #full></ueditor>
表单非空校验
<ueditor [(ngModel)]="full_source" #full required></ueditor>
除了以上功能外,还支持 中英文切换、事件监听、自定义Toolbars、二次开发、模态框创建组件 等功能。
# 说明文档
https://cipchk.github.io/ngx-ueditor/
# github地址
https://github.com/cipchk/ngx-ueditor
ok,关于NgxUEditor的介绍就到这里。基于Angular开发pc端项目,这款编辑器可能适合你,感兴趣的小伙伴可以去试试哈。
猜你喜欢
- 2024-10-12 软件质量没有银弹:阿里巴巴的25个技术实践与坑
- 2024-10-12 应对变化!盘点RSA2015十大热门产品
- 2024-10-12 Facebook宣布基于React的富文本编辑器Draft.js开源
- 2024-10-12 猪八戒当年没追到嫦娥,差的只是一个健身的距离
- 2024-10-12 办公小技巧:PPT图表也能实现交互效果
- 2024-10-12 外企必备!注塑行业术语(中英文对照)
- 2024-10-12 ionic 滚动条 ionic 滚动条 键盘
- 2024-10-12 从 Angular转到 React,网易严选的前端工程化实践
- 2024-10-12 「原神」这些字你都读对了吗-角色称号篇
- 2024-10-12 注塑机-常用注塑术语中英文对照 注塑机英语专业术语
- 最近发表
- 标签列表
-
- gitpush (61)
- pythonif (68)
- location.href (57)
- tail-f (57)
- pythonifelse (59)
- deletesql (62)
- c++模板 (62)
- css3动画 (57)
- c#event (59)
- linuxgzip (68)
- 字符串连接 (73)
- nginx配置文件详解 (61)
- html标签 (69)
- c++初始化列表 (64)
- exec命令 (59)
- canvasfilltext (58)
- mysqlinnodbmyisam区别 (63)
- arraylistadd (66)
- node教程 (59)
- console.table (62)
- c++time_t (58)
- phpcookie (58)
- mysqldatesub函数 (63)
- window10java环境变量设置 (66)
- c++虚函数和纯虚函数的区别 (66)