CKEditor5资源下载,这里我们选择ckeditor5-build-classic下载:

https://ckeditor.com/ckeditor-5-builds/download/

ckfinder3选择PHP版本下载:

https://ckeditor.com/ckeditor-4/download/#ckfinder

CKEditor5安装前请注意,我发现IE11浏览器有可能是不支持CKEditor5的,调试浏览器最好是用最新版本的火狐。

CKEditor5快速安装方法:

https://docs.ckeditor.com/ckeditor5/latest/builds/guides/quick-start.html#classic-editor

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CKEditor 5 - Classic editor</title>
<script src="https://cdn.ckeditor.com/ckeditor5/10.0.0/classic/ckeditor.js"></script>
</head>
<body>
<h1>Classic editor</h1>
<textarea name="content" id="editor">
<p>This is some sample content.</p>
</textarea>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ) )
.catch( error => {
console.error( error );
} );
</script>
</body>
</html>

上边的代码保存example.html,放到网站根目录下运行。

ClassicEditor is not defined

如果辑编器不出现,并且在console中有这个错误提示,证明你的浏览器不支持ckeditor5,请用最新版本的火狐。

没有上述的问题,把<script src="https://cdn.ckeditor.com/ckeditor5/10.0.0/classic/ckeditor.js"></script>换成本地链接就好。

ckfinder安装方法:

把ckfinder解压后,放到网站根目录下。

打开http://localhost/ckfinder/ckfinder.html

会出现如下提示:

The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file.

打开ckfinder/config.php

把false改成true,保存。

$config['authentication'] = function () {
return true;
};

再次访问http://localhost/ckfinder/ckfinder.html

正常显示,测试上传图片功能是否正常。

注意:上传图片不要带中文汉字,全改成英文或数字,不然会造成乱码,不能返回图片。

更改上传文件路径

$config['backends'][] = array(
'name' => 'default',
'adapter' => 'local',
'baseUrl' => '/ckfinder/userfiles/',
// 'root' => '', // Can be used to explicitly set the CKFinder user files directory.
'chmodFiles' => 0777,
'chmodFolders' => 0755,
'filesystemEncoding' => 'UTF-8',
);
'baseUrl'      => '/ckfinder/userfiles/',这个自定义上传图片路径,更改这里即可。

CKEditor5+ckfinder(php)结合解决方法:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CKEditor 5 - Classic editor</title>
<script src="/ckeditor/ckeditor.js"></script>
<script src="/ckeditor/translations/zh-cn.js"></script>
</head>
<body>
<h1>Classic editor</h1>
<textarea name="content" id="editor" rows="10">
<p>This is some sample content.</p>
</textarea>
<script type="text/javascript">
ClassicEditor
.create( document.querySelector( '#editor' ), {
//工具栏,可选择添加或去除
//toolbar: ['headings', 'bold', 'italic', 'blockQuote', 'bulletedList', 'numberedList', 'link', 'ImageUpload', 'undo'],
//editor加载中文简体,默认是英文
language: 'zh-cn',
ckfinder: {
uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images&responseType=json'
}
}
)
.catch( error => {
console.error( error );
} );
</script>
</body>
</html>

CKEditor5,ckfinder减肥(可忽略)

由于下载的文件中带有一些用不上的语言包和案例,为了减少空间,可以把这些文件删除

CKEditor5删除文件:

删除\ckeditor\LICENSE.md

删除\ckeditor\README.md

保留\ckeditor\translations下只留用得上的语言包,其他删除。比如我,只留一个zh-cn.js

ckfinder删除文件:

删除\ckfinder\samples

删除\ckfinder\userfiles  //如果不更改上传图片路径,这个保留不册

删除\ckfinder\CHANGELOG.html

删除\ckfinder\ckfinder.html

删除\ckfinder\LICENSE.html

删除\ckfinder\README.html

删除\ckfinder\lang下只留用得上的语言包,其他删除。比如我,只留一个zh-cn.json

ckeditor5+ckfinder(php)整合下载,本人测试直接在网页上下载是失败的,请用迅雷,虽然慢点,但好歹也可以下载。

下载地址:https://files.cnblogs.com/files/iasnsqt/ckeditor-ckfinder.rar

总结:注意浏览器是否兼容ckeditor5,还有ckeditor和ckfinder路径问题。

CKEditor5 + ckfinder3(php)的更多相关文章

  1. CKEditor5 + vue2.0 自定义图片上传、highlight、字体等用法

    因业务需求,要在 vue2.0 的项目里使用富文本编辑器,经过调研多个编辑器,CKEditor5 支持 vue,遂采用.因 CKEditor5 文档比较少,此处记录下引用和一些基本用法. CKEdit ...

  2. ckeditor5 安装高亮,颜色插件

    ckeditor5 安装高亮插件 1.准备 git clone -b stable https://github.com/ckeditor/ckeditor5-build-classic.git cd ...

  3. ckeditor5 增加居中alignment

    https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installing-plugins.html 克隆下来 gi ...

  4. CKEditor5 基本使用

    1.引入 <script type="text/javascript" src="/plugin/ckeditor5/ckeditor.js">&l ...

  5. ckeditor5富文本编辑器在vue中的使用

    安装依赖: npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic 要创建编辑器实例,必须首先将编辑器 ...

  6. CKEditor5 使用第二天 获取回传数据,图片上传

    1.当系统中存在编辑功能时,需要将数据库中数据回显到页面,因此采用了最一般的方法,通过隐藏的input标签存贮,在通过CkEditor5中的setData方法将数据赋值到富文本框中 <texta ...

  7. CKEditor5 输入文字时拼音和汉字同时输入问题

    在使用 CKEditor5 + vue 时,出现输入文字时,拼音和文字一起输入到编辑器到问题.与之前项目中使用 ckeditor 的区别是,这次项目是在 python 架构下局部引入 ckeditor ...

  8. Ckeditor5显示css样式

    Ckeditor5在编辑模式是通过js加载样式的,但是在显示时没有提供,官方提供了两种方式来实现. https://ckeditor.com/docs/ckeditor5/latest/builds/ ...

  9. ckeditor5字体颜色,字体背景颜色设置显示

    在config.js中添加相关代码: config.allowedContent=true;//关闭标签过滤, config.colorButton_enableAutomatic = true; c ...

随机推荐

  1. ubuntu中安装samba

    为了方便的和Windows之间进行交互,samba必不可少. 当然,他的安装使用也很简单: 安装: sudo apt-get install samba sudo apt-get install sm ...

  2. 【一天一道LeetCode】#113. Path Sum II

    一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Given a ...

  3. Tom DeMarco:软件工程这个概念已过时?

    原文作者:Tom Demarco,写于2009年7月 作者简介:Tom DeMarco是大西洋系统协会(www.atlsysguild.com)的负责人.他的职业生涯开始于贝尔实验室,是结构化分析和设 ...

  4. UNIX环境高级编程——管道和FIFO的额外属性

    一个描述符能以两种方式设置成非阻塞. (1)调用open时可以指定O_NONBLOCK标志. writefd = open(FIFO1,O_WRONLY | O_NONBLOCK,0); (2)如果一 ...

  5. 分布式进阶(三)Ubuntu 14.04 之JDK安装

    Ubuntu 10.04 之JDK安装 1.从官网 (http://www.Oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads ...

  6. Android原生嵌入React Native

    1.首先集成的项目目录 我使用的是直接按照react-native init Project 的格式来导入的,也就是说,我的Android项目目录是跟node_modules是在一个目录下的. 我们i ...

  7. JAVA之旅(五)——this,static,关键字,main函数,封装工具类,生成javadoc说明书,静态代码块

    JAVA之旅(五)--this,static,关键字,main函数,封装工具类,生成javadoc说明书,静态代码块 周末收获颇多,继续学习 一.this关键字 用于区分局部变量和成员变量同名的情况 ...

  8. 开源项目管理系统:ProjectForge

    ProjectForge是一个Java编写的开源的基于Web的项目管理解决方案.包括:工时表(Timesheet).费用管理.项目甘特图,控制和管理工程分解结构.集成JiRA做为问题管理系统. 使用的 ...

  9. 《Oracle Applications DBA 基础》- 9 - Concurrent Processing

    来自:http://www.itpub.net/thread-1411293-1-4.html <Oracle Applications DBA 基础>- 9 - Concurrent P ...

  10. 集群通信组件tribes之集群的消息接收通道

    与消息发送通道对应,发送的消息需要一个接收端接收消息,它就是ChannelReceiver.接收端负责接收处理其他节点从消息发送通道发送过来的消息,实际情况如图每个节点都有一个ChannelSende ...