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';

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],
  exports: [...SHARED_THIRD_MODULES, NgxTinymceModule]
})
export class SharedThirdModule {}
