CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • ckeditor config
Pages: [1] 2 3 4

Author Topic: ckeditor config  (Read 88867 times)

heXman

  • I’m new here
  • *
  • Posts: 5
  • Karma: 1
ckeditor config
February 08, 2010, 11:42:07 am
Hi,

i recently updated our CIVICRM to version 3.1.1
I use to use the FCKeditor for textareas and custom fields. I also used the filemanger to upload/manage images.

Now this version doesn't include the FCKeditor, but the new CKeditor. I wanted to give it a try and it works fine.
But now i want to customise it a little and also try to use de CKfinder module to upload images.

I added some code to the config.js
here is my code.
Quote


CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
config.language = 'nl';
config.uiColor = '#FF0000';
config.toolbar : 'Basic';
// added code for ckfinder ------>
config.filebrowserBrowseUrl = '/ckfinder/ckfinder.html';
config.filebrowserImageBrowseUrl = '/ckfinder/ckfinder.html?Type=Image';
config.filebrowserFlashBrowseUrl = '/ckfinder/ckfinder.html?Type=Flash';
config.filebrowserUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
config.filebrowserImageUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
config.filebrowserFlashUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';
// end: code for ckfinder ------>

};

Now the problem is that none of the config.js code gets used. I set the UI color to red, and language to NL, but nothing changes in the CKeditor.
Is there someplace else i have to edit to get this working and to customize the CKeditor?

Thanks for any thoughts on this.

Kurt

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
February 10, 2010, 07:49:29 am
You might also want to check on this issue with CKEditor support.

Kurund
Found this reply helpful? Support CiviCRM

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: ckeditor config
March 02, 2010, 09:17:24 am
I had problems changing the toolbar icons (wanted undo and redo).
While looking at the issue I noticed some differences between the version that ships with civicrm (3.1.3) and the current (3.2) version available from the site.
Downloaded the current version, dropped _source and _samples and replaced the civicrm/packages/ckeditor with the current version.
So far things work (for example config.uiColor, undo and redo, full toolbar).

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
March 02, 2010, 09:28:49 am
I think CiviCRM 3.1.3 uses ckeditor 3.0 hence there is difference :) We will update ckeditor to latest package for next major release 3.2 or 3.3

thanks
Kurund
Found this reply helpful? Support CiviCRM

junglecoder

  • Guest
Re: ckeditor config
March 07, 2010, 10:26:11 pm
This is a little tricky, but doable. Seems that CiviCRM does not have image uploading enabled by default.

You have to edit the file:
sites/all/modules/civicrm/packages/HTML/QuickForm/ckeditor.php

I found that file by searching the entire civicrm folder for "CKEDITOR.replace"

On line 72 is the CKEDITOR.replace( '{$name}') which replaces the textarea with the ckeditor. In order to enable uploading you have to add additional variables per: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)

I wanted to use the same upload settings as the FCKeditor in Drupal, so mine looks like this:

CKEDITOR.replace( '{$name}',
{
   filebrowserBrowseUrl : '/index.php?q=imce&app=FCKEditor|url@txtUrl|width@txtWidth|height@txtHeight',
   filebrowserImageBrowseUrl : '/index.php?q=imce&app=FCKEditor|url@txtUrl|width@txtWidth|height@txtHeight',
   filebrowserFlashBrowseUrl : '/index.php?q=imce&app=FCKEditor|url@txtUrl|width@txtWidth|height@txtHeight',
   filebrowserUploadUrl : '/sites/default/files/',
   filebrowserImageUploadUrl : '/sites/default/files/',
   filebrowserFlashUploadUrl : '/sites/default/files/',
} );

Worked for me, hope it works for you :)

junglecoder

  • Guest
New ckeditor doesn't seem to support uploads for free
March 07, 2010, 10:59:45 pm
Update:

The fckeditor file browser and the new ckeditor don't completely work together. So I pointed to the ckfinder (another product by the folks who make ckeditor) that I uploaded:

   CKEDITOR.replace( '{$name}',
   {
      filebrowserBrowseUrl : '/sites/all/modules/civicrm/packages/ckfinder/ckfinder.html',
      filebrowserImageBrowseUrl : '/sites/all/modules/civicrm/packages/ckfinder/ckfinder.html?Type=Images',
      filebrowserFlashBrowseUrl : '/sites/all/modules/civicrm/packages/ckfinder/ckfinder.html?Type=Flash',
      filebrowserUploadUrl : '/sites/default/files/',
      filebrowserImageUploadUrl : '/sites/default/files/',
      filebrowserFlashUploadUrl : '/sites/default/files/'
   });

The problem is though that ckfinder needs a license ($59) or else you get a message stating that you are using an unlicensed version. So, it seems that CiviCRM has moved forward to the new ckeditor but it doesn't have the ability to upload images to the server. I'm going to try to get the old fckeditor to work with the new version of CiviCRM.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
March 07, 2010, 11:33:54 pm
Note that we have upgraded Ckeditor to 3.2 for next 3.1.x release.

Kurund
Found this reply helpful? Support CiviCRM

junglecoder

  • Guest
Re: ckeditor config
March 08, 2010, 10:51:56 am
Quote from: Kurund Jalmi on March 07, 2010, 11:33:54 pm
Note that we have upgraded Ckeditor to 3.2 for next 3.1.x release.

Kurund

Will the included Ckeditor 3.2 have image uploading enabled by default? Will it have a licensed version of Ckfinder included?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
March 08, 2010, 10:56:38 am
Quote
Will the included Ckeditor 3.2 have image uploading enabled by default? Will it have a licensed version of Ckfinder included?

No

Kurund
Found this reply helpful? Support CiviCRM

Alan.Guggenheim

  • Guest
Re: ckeditor config
March 21, 2010, 10:33:10 am
Can we at least have file browsing enabled in ckeditor, to find the exact url of existing images ?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
March 22, 2010, 09:10:02 am
I don't think it is a good idea to expose your server file structure.

Kurund
Found this reply helpful? Support CiviCRM

Alan.Guggenheim

  • Guest
Re: ckeditor config
March 22, 2010, 12:19:02 pm
Can we just limit it to the images directory? To prepare emails, events,... it is important to have a user friendly interface that can insert media easily.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
March 22, 2010, 12:33:26 pm
Quote
Can we just limit it to the images directory?
I am not sure if CKEditor allows that. You might want to check with CKEditor guys.

Kurund
Found this reply helpful? Support CiviCRM

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ckeditor config
March 22, 2010, 01:16:59 pm

You might want to consider buying a licensed version of CKFinder from CKSource. Open source projects like CKEditor, CiviCRM etc need revenue streams to survive and prosper :)

Alan, if you can investigate and figure out what changes folks need to do when they install a licensed version of CKFinder and document that, it would be great and help the community a lot

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Martin Fuggle

  • I post frequently
  • ***
  • Posts: 172
  • Karma: 3
    • Travel and Photography
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 6.x and 7.x
  • MySQL version: 5.1.36-cll
  • PHP version: 5.3.6
Re: ckeditor config
March 28, 2010, 02:07:02 am
I am using CKEditor (3.2) and a licensed version of CKFinder (1.4.3) in Drupal 6.16.  I think the best solution for Drupal/Civicrm would be to have Civicrm detect the editor used in Drupal and then use the same otherwise the editors have to be configured independently.

Is that possible?

Regards
Martin Fuggle

Pages: [1] 2 3 4
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • ckeditor config

This forum was archived on 2017-11-26.