首页 > 其他 > 详细

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

时间:2020-12-08 09:46:45      阅读:56      评论:0      收藏:0      [点我收藏+]

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‘}]})

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

原文:https://www.cnblogs.com/hepeng/p/14100276.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!