添加富文本插件
This commit is contained in:
33
src/app/shared/shared-third.module.ts
Normal file
33
src/app/shared/shared-third.module.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { ScrollingModule } from '@angular/cdk/scrolling';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { NgxTinymceModule } from 'ngx-tinymce';
|
||||
import { environment } from '@env/environment';
|
||||
import { AbmModule } from 'angular-baidu-maps';
|
||||
|
||||
const TinyMce = NgxTinymceModule.forRoot({
|
||||
baseURL: 'assets/tinymce/',
|
||||
config: {
|
||||
language_url: 'assets/tinymce/langs/zh_CN.js',
|
||||
language: 'zh_CN',
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap print preview anchor',
|
||||
'searchreplace visualblocks code fullscreen',
|
||||
'insertdatetime media table paste imagetools wordcount'
|
||||
],
|
||||
toolbar:
|
||||
'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
||||
}
|
||||
});
|
||||
|
||||
const SHARED_THIRD_MODULES = [DragDropModule, ScrollingModule];
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
entryComponents: [],
|
||||
imports: [...SHARED_THIRD_MODULES, TinyMce, AbmModule.forRoot({ apiKey: '8oZDc2QBZSbjNpoC42cd5jGVa3GknG1c' })],
|
||||
exports: [...SHARED_THIRD_MODULES, NgxTinymceModule]
|
||||
})
|
||||
export class SharedThirdModule {}
|
||||
Reference in New Issue
Block a user