简体   繁体   English

如何添加浏览器服务器以在CKEditor中上传图像

[英]How to add browser server to upload images in CKEditor

I'm using CKEditor in my web, I have intergated CKeditor and want to upload my image from pc to server I refer this link: 我在我的网站上使用CKEditor,我集成了CKeditor,并希望将图像从PC上载到服务器,请参考以下链接:

http://devture.com/projects/ckeditor-imagebrowser/demo/

this is my code: 这是我的代码:

<div class="container">
<!-- <h2><label for="editor1">Developer Site Editor</label></h2> -->
    <textarea name="ir1" id="ir1" rows="1" cols="10" style="width:580px; height:600px; min-width:400px; min-height:50px; display:none;"> </textarea>
</div>

<script>
    CKEDITOR.replace( 'ir1', {
    // Define the toolbar: http://docs.ckeditor.com/#!/guide/dev_toolbar
    // The standard preset from CDN which we used as a base provides more features than we need.
    // Also by default it comes with a 2-line toolbar. Here we put all buttons in a single row.
    toolbar: [
    { name: 'document', items: [ 'Source' ] },
    { name: 'basicstyles', items: [ 'Bold', 'Italic' ] },
    { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] },
    { name: 'links', items: [ 'Link', 'Unlink' ] },
    { name: 'insert', items: [ 'CodeSnippet', 'Image', 'Mathjax', 'EmbedSemantic', 'Table' ] },
    { name: 'tools', items: [ 'Maximize' ] },
    { name: 'styles', items: [ 'Format', 'Styles' ] }
],          

...
</script>

When I run and icon image display but it is not include 'browsers server' button 当我运行并显示图标图像但不包括“浏览器服务器”按钮时

How to add 'Browsers Server' button in CKEditor ? 如何在CKEditor中添加“浏览器服务器”按钮? Thank so much !! 非常感谢 !!

Please see this link as well as other links from that section. 请查看此链接以及该部分的其他链接。

Basically you should set at minimum these two settings: filebrowserBrowseUrl and filebrowserUploadUrl advanced file manager like eg CKFinder or to some custom code which will handle uploads and file browsing for you. 基本上,您应该至少设置以下两个设置: filebrowserBrowseUrlfilebrowserUploadUrl高级文件管理器(例如CKFinder)或一些自定义代码,这些代码将为您处理上传和文件浏览。

Please also note that File Browser plugin is required (it is available by default in standard and full packages). 另请注意, 文件浏览器插件是必需的(默认情况下在标准和完整软件包中可用)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM