2023-05-14 16:34:00sandersjc3

CKeditor 4.11.1 網頁編纂器與CKfinder

在搜索引擎不停改版網頁不能不進入https
所以後台編纂器圖片上傳也變得不能用了
不得已又就教了谷哥大神
多方嘗試後,找到
CKeditor 4.11.1 網頁編纂器與CKfinder 2.6.2.1 圖片上傳可以用

1.png


檔案下載了今後,籠蓋之前檔案
找到 ckeditor/config.js

  1. CKEDITOR.editorConfig = function( config ) {
  2.         // Define changes to default configuration here. For example:
  3.         // config.language = 'fr';
  4.         // config.uiColor = '#AADC6E';
  5. }
複製代碼



內插手

  1. // Remove some buttons provided by the standard plugins, which are
  2.         // not needed in the Standard(s) toolbar.
  3.         config.removeButtons = 'Underline,Subscript,Superscript';
  4.  
  5.         // Set the most common block elements.
  6.         config.format_tags = 'p;h1;h2;h3;pre';
  7.  
  8.         // Simplify the dialog windows.
  9.         config.removeDialogTabs = 'image:advanced;link:advanced';
  10.         baseurl = 'https://'+window.location.hostname;
  11.         config.filebrowserBrowseUrl = baseurl+'/includes/ckfinder/ckfinder.html';
  12.         config.filebrowserImageBrowseUrl = baseurl+'/includes/ckfinder/ckfinder.html?Type=Images';網站架設
  13.         config.filebrowserFlashBrowseUrl = baseurl+'/includes/ckfinder/ckfinder.html?Type=Flash';
  14.         config.filebrowserUploadUrl = baseurl+'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; //可上傳一般檔案
  15.         config.filebrowserImageUploadUrl = baseurl+'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';//可上傳圖檔
  16.         config.filebrowserFlashUploadUrl = baseurl+'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';//可上傳Flash檔案
  17. };
複製代碼



ckfinder/config.php

  1. function CheckAuthentication()
  2. {
  3.         return false;
  4. }
複製代碼



改成

  1. function CheckAuthentication()
  2. {
  3.         return true;
  4. }
複製代碼



路徑就改成妳要的路徑就可以了

  1. $baseUrl = 'https://'.$_SERVER['HTTP_HOST'].'/xxxx/';
複製代碼



文章出處:Netyea  NetYea, 新竹網頁設計, 竹北網頁設計, 苗栗網頁設計, 桃園網頁設計



文章出自: