添加富文本插件
This commit is contained in:
@ -22,3 +22,7 @@ export * from './utils/yuan';
|
||||
|
||||
// Module
|
||||
export * from './shared.module';
|
||||
export * from './shared-delon.module';
|
||||
export * from './shared-zorro.module';
|
||||
export * from './shared-third.module';
|
||||
export * from './widget/st-widget.module';
|
||||
|
||||
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 {}
|
||||
@ -25,6 +25,7 @@ import { MasonryModule } from './components/masonry';
|
||||
import { MouseFocusModule } from './components/mouse-focus';
|
||||
import { ScrollbarModule } from './components/scrollbar';
|
||||
import { StatusLabelModule } from './components/status-label';
|
||||
import { SharedThirdModule } from './shared-third.module';
|
||||
|
||||
const MODULES = [
|
||||
AddressModule,
|
||||
@ -35,6 +36,7 @@ const MODULES = [
|
||||
MouseFocusModule,
|
||||
ScrollbarModule,
|
||||
StatusLabelModule,
|
||||
SharedThirdModule,
|
||||
...PRO_SHARED_MODULES
|
||||
];
|
||||
// #endregion
|
||||
|
||||
@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { STWidgetRegistry } from '@delon/abc/st';
|
||||
import { DelonFormModule } from '@delon/form';
|
||||
import { DelonFormModule, WidgetRegistry } from '@delon/form';
|
||||
import { AddressModule, EditorModule, FileManagerModule } from '@shared';
|
||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
||||
@ -58,7 +58,7 @@ export const STWIDGET_COMPONENTS = [
|
||||
entryComponents: STWIDGET_COMPONENTS
|
||||
})
|
||||
export class STWidgetModule {
|
||||
constructor(widgetRegistry: STWidgetRegistry) {
|
||||
constructor(widgetRegistry: WidgetRegistry) {
|
||||
widgetRegistry.register(EditorWidget.KEY, EditorWidget);
|
||||
widgetRegistry.register(ImgWidget.KEY, ImgWidget);
|
||||
widgetRegistry.register(AddressWidget.KEY, AddressWidget);
|
||||
|
||||
Reference in New Issue
Block a user