我们如何将ckfinder集成到ANGULAR 6的ckeditor中?

问题描述 投票:1回答:1

嗨,我一直在尝试将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 {}

enter image description here

angular ckeditor ckfinder
1个回答
0
投票

仅包含

<script src="ckeditor.com/apps/ckfinder/3.4.5/ckfinder.js"></script> 

进入index.html文件,它将起作用!

© www.soinside.com 2019 - 2024. All rights reserved.