Socket
Book a DemoInstallSign in
Socket

@twp0217/ngx-tinymce

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twp0217/ngx-tinymce

Angular(v2+) tinymce component

latest
Source
npmnpm
Version
6.1.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

ngx-tinymce

简介

基于angular(v2+)的tinymce组件

使用

  • 安装依赖包:tinymce@twp0217/ngx-tinymce
npm install tinymce @twp0217/ngx-tinymce --save
  • angular-cli.json中增加tinymce配置
"scripts": [
  "node_modules/tinymce/tinymce.js",
  "node_modules/tinymce/themes/modern/theme.js"
]
  • 在module导入NgxTinymceModule
import { NgxTinymceModule } from "@twp0217/ngx-tinymce";

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    
    NgxTinymceModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  • 在模板页面使用
<ngx-tinymce [(ngModel)]="html"></ngx-tinymce>

system.js 配置

map 中添加以下配置

map: {
  'ngx-tinymce': 'npm:ngx-tinymce/bundles/ngx-tinymce.umd.min.js'
}

文档

属性(Attributes)

名称类型默认值说明
optionsTinymceOptions{ skin_url = "assets/tinymce/skins/lightgray"; }配置项

事件(Events)

Native

onClick
onDblClick
onMouseDown
onMouseUp
onMouseMove
onMouseOver
onMouseOut
onMouseEnter
onMouseLeave
onKeyDown
onKeyPress
onKeyUp
onContextMenu
onPaste

Core

onInit
onFocus
onBlur
onBeforeSetContent
onSetContent
onGetContent
onPreProcess
onPostProcess
onNodeChange
onUndo
onRedo
onChange
onDirty
onRemove
onExecCommand

Paste Plugin

onPastePreProcess
onPastePostProcess

支持

  • 如果项目对你有帮助,请点颗星:star:,谢谢。
  • 如果你对项目有想法、问题、BUG,欢迎讨论。

Keywords

ng

FAQs

Package last updated on 25 Dec 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