【发布时间】:2019-02-20 07:40:53
【问题描述】:
您好,我一直在尝试将 ckeditor5 与 Angular 应用程序集成,并按照 文件。
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html
https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/ckfinder.html
正常的 ckeditor5 正在工作,但是当我尝试使用它启用 ckfinder 时,它无法正常工作。 具体来说,我正在尝试将图像上传到服务器,并且需要执行一些基本操作,例如图像大小调整 在 CKFinder 中提到。 根据文档,当我们单击 ckfinder 按钮时,它应该打开模态框,但现在它没有打开“
提前感谢您的时间和感谢
我正在粘贴我的文件供您参考
app.component.html
<ckeditor
[(ngModel)]="model.editorData"
[editor]="Editor"
[config]="{
toolbar: ['ckfinder'],
ckfinder: {
options: {
resourceType: 'Images'
},
uploadUrl: 'http://localhost:3000/test/upload/iamge'
}
}"
></ckeditor>
app.component.ts
import { Component } from '@angular/core';
import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'ckeditor2';
public Editor = ClassicEditor;
public model = {
editorData: '<p>Hello, world!</p>'
};}
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
NgxEditorModule,
HttpClientModule,
AngularFontAwesomeModule,
CKEditorModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
【问题讨论】:
-
您找到解决方案了吗?
-
@Matthew 还没有,我用'tinymce' github.com/tinymce/tinymce-angular