angular项目集成tinymce富文本输入框

https://www.tiny.cloud/docs/integrations/angular/#tinymceangularintegrationquickstartguide

1. npm install --save @tinymce/tinymce-angular

2. npm install --save tinymce

3.

Using a text editor; open angular.json and add TinyMCE to the assets property.

 "assets": [
   { "glob": "**/*", "input": "node_modules/tinymce", "output": "/tinymce/" }
 ]

4.
import { EditorModule, TINYMCE_SCRIPT_SRC } from '@tinymce/tinymce-angular';
  /* ... */
  @NgModule({
    /* ... */
    imports: [
      EditorModule
    ],
    providers: [
      { provide: TINYMCE_SCRIPT_SRC, useValue: 'tinymce/tinymce.min.js' }
    ]
  })

  5. copy tinymce.min.js to assets folder after download from https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js

 

import{EditorModule,TINYMCE_SCRIPT_SRC}from'@tinymce/tinymce-angular';/* ... */@NgModule({/* ... */imports:[EditorModule],providers:[{provide:TINYMCE_SCRIPT_SRC,useValue:'tinymce/tinymce.min.js'}]})
上一篇:TinyMCE如何能实现直接粘贴把图片上传到服务器中


下一篇:TinyMCE粘贴图片自动上传到服务器(Java版)