0

enter image description here

Hi everybody! I'm having a problem dragging an image into ckeditor. And I think my problem is due to the trial version. ps:/ image with format: jpg

code:

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

$config['resourceTypes'][] = array(
    'name'              => 'Files', // Single quotes not allowed.
    'directory'         => 'files',
    'maxSize'           => 0,
    'allowedExtensions' => '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip',
    'deniedExtensions'  => '',
    'backend'           => 'default'
);

$config['resourceTypes'][] = array(
    'name'              => 'Images',
    'directory'         => 'images',
    'maxSize'           => 0,
    'allowedExtensions' => 'bmp,gif,jpeg,jpg,png',
    'deniedExtensions'  => '',
    'backend'           => 'default'
);
$config['tempDirectory'] = sys_get_temp_dir();
  • Could you please paste the JavaScript code you use to start CKEditor and CKFinder on your webpage? – zaak Jul 27 '18 at 10:16
  • Check the official [CKFinder package for Laravel 5.5+](https://github.com/ckfinder/ckfinder-laravel-package) - hopefully this will make the integration easier. – Anna Tomanek Jul 31 '18 at 10:10

1 Answers1

0

<script src="{{ asset('public/ckeditor/ckeditor.js') }}"></script>
<script  type="text/javascript">
    CKEDITOR.replace( 'contentnews', {
        filebrowserBrowseUrl: '{{ asset('public/ckfinder/ckfinder.html') }}',
        filebrowserImageBrowseUrl: '{{ asset('public/ckfinder/ckfinder.html?type=Images') }}',
        filebrowserFlashBrowseUrl: '{{ asset('public/ckfinder/ckfinder.html?type=Flash') }}',
        filebrowserUploadUrl: '{{ asset('public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files') }}',
        filebrowserImageUploadUrl: '{{ asset('public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images') }}',
        filebrowserFlashUploadUrl: '{{ asset('public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash') }}'
    } );
</script>

CKEDITOR.editorConfig = function( config ) {
 // Define changes to default configuration here.
 // For complete reference see:
 // http://docs.ckeditor.com/#!/api/CKEDITOR.config

 // The toolbar groups arrangement, optimized for two toolbar rows.
 config.toolbarGroups = [
  { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
  { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
  { name: 'links' },
  { name: 'insert' },
  { name: 'forms' },
  { name: 'tools' },
  { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
  { name: 'others' },
  '/',
  { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
  { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
  { name: 'styles' },
  { name: 'colors' },
  { name: 'about' }
 ];

 // Remove some buttons provided by the standard plugins, which are
 // not needed in the Standard(s) toolbar.
 config.removeButtons = 'Underline,Subscript,Superscript';

 // Set the most common block elements.
 config.format_tags = 'p;h1;h2;h3;pre';

 // Simplify the dialog windows.
 config.removeDialogTabs = 'image:advanced;link:advanced';
};

I do not think the initialization of my ckeditor is having problems.