[英]CkEditor Is not uploading images and files. Even i have no Option to upload image or files
I am very New to CKEditor.我对 CKEditor 很陌生。 I am using many plugins, for many things.
我正在使用很多插件,做很多事情。 I have added many Uploader plugins but failed.
我添加了许多上传器插件但失败了。 At last i heard about
SimpleUploads<\/code> I bought this plugin in. But i Dont know how to install it on CKEditor.
最后我听说了
SimpleUploads<\/code>我买了这个插件。但我不知道如何在 CKEditor 上安装它。
Or if anyone have other method to Upload Images, Files and Embed PDF files.
或者,如果有人有其他方法来上传图像、文件和嵌入 PDF 文件。 Please Share with me Please.
请与我分享请。
"
You don't need any additional plugin if you just want to upload files. 如果您只想上传文件,则不需要任何其他插件。 Please, read their documentation: http://docs.ckeditor.com/#!/guide/dev_file_browse_upload
请阅读他们的文档: http : //docs.ckeditor.com/#!/guide/dev_file_browse_upload
All you have to do is to set the config.filebrowserUploadUrl
with the path of a server script that will save the uploaded files. 您所要做的就是使用服务器脚本的路径设置
config.filebrowserUploadUrl
,该脚本将保存上载的文件。
If you have been adding "many Uploader plugins", your configuration might be a mess right now, so it could be a good idea to start from zero and follow a guide like this one: https://www.pluginsforckeditor.com/Tutorials/86/Upload-files-with-CKEditor 如果您已经添加了“许多Uploader插件”,那么您的配置可能现在很混乱,因此从零开始并遵循这样的指南可能是一个好主意: https : //www.pluginsforckeditor.com/Tutorials / 86 /使用CKEditor上传文件
CKEditor is the favorite web-based word processor of almost all the web developers. CKEditor是几乎所有Web开发人员最喜欢的基于Web的文字处理器。 But the issue is, it does not come with an in-built image uploading feature, ie CKEditor does not know how to handle image uploads.
但是问题是,它没有内置的图像上传功能,即CKEditor不知道如何处理图像上传。 So we will assign an assistant who knows how to deal with image uploads and file management.
因此,我们将指派一位知道如何处理图像上传和文件管理的助理。
Our assistant is KCFinder, a free open-source web file manager. 我们的助手是免费的开源Web文件管理器KCFinder。 It can be integrated into FCKeditor, CKEditor, and TinyMCE WYSIWYG web editors (or your custom web applications) to upload and manage images, flash movies, and other files that can be embedded in an editor's generated HTML content.
可以将其集成到FCKeditor,CKEditor和TinyMCE WYSIWYG Web编辑器(或您的自定义Web应用程序)中,以上传和管理图像,Flash电影以及其他可以嵌入编辑器生成的HTML内容中的文件。
I assume you have already set up your CKEditor into your web page. 我假设您已经将CKEditor设置到您的网页中。 If you haven't done it yet, you can follow the instructions in my previous article: CKEditor: Web-based Word Processor For Your Web Pages
如果尚未完成操作,则可以按照上一篇文章中的说明进行操作: CKEditor:网页的基于Web的文字处理器
Let's get into our business. 让我们开始我们的业务。
1) Download KCFinder > http://kcfinder.sunhater.com/download 1)下载KCFinder> http://kcfinder.sunhater.com/download
2) Extract the kcfinder directory in the .zip file to the public directory of your project. 2)将.zip文件中的kcfinder目录提取到项目的公共目录中。
3) Open /public/ckeditor/config.js and add code lines as follows; 3)打开/public/ckeditor/config.js并添加如下代码行;
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
/* Show these image/flash browsing feature only to Admins */
config.filebrowserBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=files';
config.filebrowserImageBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=images';
config.filebrowserFlashBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=flash';
/* Image/Flash upload feature using kcfinder tool */
config.filebrowserUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=files';
config.filebrowserImageUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=images';
config.filebrowserFlashUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=flash';
};
If you do not want to let your users browse through previously-uploaded files in the server, you can remove/block-comment the first three lines and keep only the last three lines which actually do the uploading part or else you can add user level controls for each feature as per your requirement. 如果您不想让用户浏览服务器中以前上传的文件,则可以删除/阻止注释前三行,而仅保留最后三行来实际执行上传部分,否则您可以添加用户级别根据您的要求控制每个功能。 Never let users to see the files in your server.
切勿让用户看到您服务器中的文件。 If they change the files, other file links can be broken and it will result in huge mess in your application.
如果他们更改文件,其他文件链接可能会中断,这将导致应用程序混乱。
4) Activate KCFinder. 4)激活KCFinder。
By default KCFinder comes disabled. 默认情况下,KCFinder被禁用。 To change it, go to kcfinder/conf/config.php and under general settings, change the value of 'disabled' to false.
要更改它,请转到kcfinder / conf / config.php并在常规设置下将“ disabled”的值更改为false。 Now, users can upload and manage files (in our case, the image files) on your web application using CKEditor interface.
现在,用户可以使用CKEditor界面在您的Web应用程序上上传和管理文件(在我们的示例中为图像文件)。
You can check the detailed steps in my blog article: https://ashenlive.blogspot.com/2016/09/ckeditor-image-upload-with-kcfinder.html 您可以在我的博客文章中查看详细步骤: https : //ashenlive.blogspot.com/2016/09/ckeditor-image-upload-with-kcfinder.html
you have change config for upload您已更改上传配置
window.parent.opener.CKEDITOR.tools.callFunction(1, xValue, ''); window.parent.opener.CKEDITOR.tools.callFunction(1, xValue, '');
dos not work two ckeditor upload image only page不工作两个ckeditor仅上传图片页面
you can 1- get CKEditorFuncNum => int funcNum = Context.GetQueryString("CKEditorFuncNum").ToInt();你可以 1- 获取 CKEditorFuncNum => int funcNum = Context.GetQueryString("CKEditorFuncNum").ToInt(); then 2- change parameters callFunction
然后 2- 更改参数 callFunction
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.