Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> FCKeditor/WYSIWYG Issues
Author Message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Mon Dec 21, 2009 2:56 pm Reply with quote

After much analysis, research and testing, I've decided to wait for the next release of CKEditor (i.e. the 3.1 release) before replacing FCKeditor 2.6.4.1 in nukeWYSIWYG(tm).

For details, see Only registered users can see links on this board! Get registered or login!.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
eldorado
Involved
Involved



Joined: Sep 10, 2008
Posts: 424
Location: France,Translator

PostPosted: Tue Dec 22, 2009 5:04 am Reply with quote

kguske wrote:
Another change that impacts nukeWYSIWYG(tm) is the way the editor is loaded. While FCKeditor 2.6.4.1 loaded the JS on demand (i.e. in the BODY section), CKEditor requires that it be loaded in the HEAD section. This appears to have been done to improve speed and also to enable the ability to more easily activate the editor for all visible textareas. Although this change succeeds on all fronts, it requires additional complexity in the installation of the CKEditor JS in the HEAD section, and may require changes to PHP-Nuke and RavenNuke(tm) modules, addons, tweaks to avoid loading the HEAD JS on every page.

_________________
Only registered users can see links on this board! Get registered or login! (My RN site)- Only registered users can see links on this board! Get registered or login!(cod4 clan) - Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website MSN Messenger
kguske







PostPosted: Tue Dec 22, 2009 6:59 pm Reply with quote

Hi eldorado - did you have a comment / question about this?
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Dec 24, 2009 11:02 pm Reply with quote

From what I have read 3.1 is very close. It is in final testing. They only have like 12 open tickets.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
spiders
Regular
Regular



Joined: Jun 05, 2006
Posts: 90
Location: Aachen / Germany

PostPosted: Wed Dec 30, 2009 11:47 am Reply with quote

CK-Editor rocks !!! Smile

_________________
http://www.m2-medias.de >> the global Web Content Management Services
http://raven24.m2-medias.de/ >> My Raven24 Testside 
View user's profile Send private message Visit poster's website
eldorado







PostPosted: Wed Dec 30, 2009 5:39 pm Reply with quote

kguske wrote:
Hi eldorado - did you have a comment / question about this?

yeah , i had one , but don't remember what it was.... only to comment more and say..CK rocks and that I saw 2.4 on LgNuke (phpnuke italia)
 
kguske







PostPosted: Wed Dec 30, 2009 9:09 pm Reply with quote

2.4?
 
kguske







PostPosted: Wed Dec 30, 2009 9:25 pm Reply with quote

Interesting. I looked at the demo for LGNuke 2.0.4, which includes nukeWYSIWYG with FCKeditor 2.6.4. Is that what you meant?

Also, I noticed some nice features on this distribution, including:
- AJAX rating
- AJAX comment posting and removal
- Not sure what the "professional newsletter" enhancement is
- phpBB 3 integration
- expanded short URLs to include story title
- tags and tag cloud functions (I wonder if this requires theme changes)
 
spiders







PostPosted: Mon Jan 11, 2010 6:34 am Reply with quote

HI,

CKEditor 3.1 released!!!! Smile

Interesting features that have been implemented in version 3.0 is not yet as planned, the development team now returns to the CKEditor 3.1. The WYSIWYG editor now offers native PHP and jQuery integration. PHP developers have access to an API for the Integration of the editor. The application supports baseHref for specifying a URL as the default location for all data such as images, which can help in managing sites under multiple domains. A new button provided faster access to DIV containers.

and more....

http://ckeditor.com/blog/CKEditor_3.1_released
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Mon Jan 11, 2010 6:58 am Reply with quote

Quote:
- tags and tag cloud functions (I wonder if this requires theme changes)


Just a little added css. I used their tag cloud on the latest Tricked Out News. It is a very simple integration... They documented the additions in the modules it is added to extremely well....

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
kguske







PostPosted: Mon Jan 11, 2010 7:51 am Reply with quote

Wow...although I'm happy to see some of the features (like jQuery and PHP integration - though I need to understand what that means), I'm disappointed that 3.1 doesn't include the most important function missing from FCKeditor 2.6.4 - the ability to upload images / files. This was mentioned as a target for 3.1. I can understand wanting revenue from the commercial CKFinder addon that provides this, but having that functionality in 2.6.4 and not having anything, even a limited version in CK 3.1 makes it hard to justify switching - even with all the other benefits of 3.1

The DIV button, table merge and email protected existed in 2.6.4.
 
spiders







PostPosted: Mon Jan 11, 2010 7:57 am Reply with quote

Hi are you going to use it in nukeWYSIWYG(tm) anyway ?
 
Palbin







PostPosted: Mon Jan 11, 2010 9:18 am Reply with quote

Perhaps one of these could be used?

http://labs.corefive.com/2009/10/30/an-open-file-manager-for-ckeditor-3-0/

http://pgrfilemanager.sourceforge.net/
 
kguske







PostPosted: Mon Jan 11, 2010 9:37 am Reply with quote

I looked at these and more (see Only registered users can see links on this board! Get registered or login! for details). Nothing worked well enough to include without issues.

I may modify the FCKeditor 2.6.4 tools to work with CKeditor - when time permits.
 
kguske







PostPosted: Mon Jan 11, 2010 9:55 am Reply with quote

spiders wrote:
Hi are you going to use it in nukeWYSIWYG(tm) anyway ?

Not until the upload issue is adequately addressed. As great as CKeditor 3.1 is, I don't think that justifies removing the upload functionality in 2.6.4. As I said, I'm really disappointed that this wasn't added to 3.1, especially since one of the admins on the CKeditor forums said it would be.
 
Anders
Worker
Worker



Joined: Jun 16, 2004
Posts: 159
Location: Sweden

PostPosted: Thu Feb 10, 2011 12:31 pm Reply with quote

kguske wrote:
spiders wrote:
Hi are you going to use it in nukeWYSIWYG(tm) anyway ?

Not until the upload issue is adequately addressed. As great as CKeditor 3.1 is, I don't think that justifies removing the upload functionality in 2.6.4. As I said, I'm really disappointed that this wasn't added to 3.1, especially since one of the admins on the CKeditor forums said it would be.


any changes??
 
View user's profile Send private message
kguske







PostPosted: Thu Feb 10, 2011 2:04 pm Reply with quote

Not yet. I was looking at a new upload tool this week...
 
bobbyg
Worker
Worker



Joined: Dec 05, 2007
Posts: 212
Location: Tampa, Florida

PostPosted: Fri Aug 05, 2011 12:55 am Reply with quote

I there any plan to replace fckeditor with ckeditot in a future rn release?
 
View user's profile Send private message Visit poster's website
kguske







PostPosted: Fri Aug 05, 2011 9:44 am Reply with quote

Not a definite plan, but we are looking into it. The issue has been the lack of a file browse / upload facility in ckeditor.
 
spottedhog
Regular
Regular



Joined: Jun 02, 2004
Posts: 88

PostPosted: Sun Nov 27, 2011 9:31 pm Reply with quote

CKEditor 3.6.4 is the current version I think...

Here is a link that shows how to include an upload function:

http://www.mixedwaves.com/2010/02/integrating-fckeditor-filemanager-in-ckeditor/

...and it works perfectly
 
View user's profile Send private message Visit poster's website
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Nov 28, 2011 7:42 pm Reply with quote

Definitely not something you would want a novice doing, but a RN developer, sure, why not. Laughing

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
spottedhog







PostPosted: Mon Nov 28, 2011 7:58 pm Reply with quote

Below is the code I use in my PHP Nuke fork. This should be enough to convert to RN. The biggest change is probably replacing $context with is_user() or is_admin()

Code:
   // CKEditor code for text editor

   // $toolbar choices = Admin - Basic - User
   function text_editor ($field_name, $value, $toolbar = "Basic", $cols = "90%", $rows = 10) {
   global $context, $nukeurl;
   
   // DO NOT CHANGE THESE VALUES!
   // "36" is the current version (3.6.4)
   include_once('./includes/ckeditor36/ckeditor.php');
   $CKEditor = new CKEditor();
   $CKEditor->basePath = 'includes/ckeditor36/';

   $CKEditor->returnOutput = true;   // Do not print the code directly to the browser, return it instead
   
   // Values below may be modified, but please be careful.
   // Set the graphical look of CKEditor.
   //$config['skin'] = 'office2003';   // default skin is -> kama   -->  available skins: kama, office2003, v2  --- uncomment line to use
   // User Interface Color, works only on default skin: kama
   $config['uiColor'] = '#AABBCC';  // User Interface Color ... sets CKEditor's toolbar gradient color
   
   // set up Width and Height of CKEditor
   $config['width'] = $cols;  // width can be set to pixels or percentage... For Example:  $config['width'] = 600;  -OR- $config['width'] = '90%';
   $config['height'] = $rows * 17;  // Height is set in pixels.  Each row is approximately 17 pixels tall.  --> % DOES NOT WORK!
   
   // Remove the toolbar collapse and resize defaults
   $config['toolbarCanCollapse'] = false;
   $config['removePlugins'] = 'resize';
   $config['resize_enabled '] = false;
   
   #####################################################################################
   // LOCATION FOR IMAGE UPLOADS: --> Default: /userfiles/
   // change code-located in file --> includes/ckfilemanager/connectors/php/config.php ---  around line 34
   
   // Set CKEditor Language --- Default language is 'en'  (English)
   //$config['defaultLanguage']= 'en';  // replace -en- with the language you wish to use as default, and then "uncomment" this line.
   
   // Languages located in folder:  includes/ckeditor36/lang
   
   // By default CKEditor has a "Language Auto Detection" code built in.  If you do not wish to use this, but instead, want the editor to be only one
   // specific language, you will need to change the code line below to the desired language.  (make sure to "uncomment" the line if you do this)
   //$config['language'] = 'en';  // to use, change "en" to desired language and uncomment this line.
   #####################################################################################
   
   // TOOLBARS ---    '/', = line break
   // Currently there are 3 Toolbars:  Admin, User, and Basic
   // Admin toolbar has 'Flash' and 'Styles'. User toolbar does not.  Otherwise both are the same.
   if ($toolbar == "Admin") {
      $config['toolbar'] = array(

          array('Source','-','Save','NewPage','Preview','-','Templates'),
          array('Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'),
          '/',
          array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
          array('Maximize', 'ShowBlocks'),
          array('BidiLtr', 'BidiRtl'),
          '/',
          array('Bold','Italic','-','Subscript','Superscript'),
          array('NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'),
          array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
          '/',
          array('Link','Unlink','Anchor'),
          array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
          array('TextColor','BGColor'),
          '/',
          array('Styles','Format','Font','FontSize'),  // Styles is removed on the User toolbar below.
          array('About')

      );
   }
   
   if ($toolbar == "User") {
      $config['toolbar'] = array(

          array('Source','-','Save','NewPage','Preview','-','Templates'),
          array('Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'),
          '/',
          array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
          array('Maximize', 'ShowBlocks'),
          array('BidiLtr', 'BidiRtl'),
          '/',
          array('Bold','Italic','-','Subscript','Superscript'),
          array('NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'),
          array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
          '/',
          array('Link','Unlink','Anchor'),
          array('Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
          array('TextColor','BGColor'),
          '/',
          array('Format','Font','FontSize'),
          //array('Styles','Format','Font','FontSize'),  // Styles (css) can potentially be dangerous, so it is removed in the above line.
          array('About')

      );
   }
   
   if ($toolbar == "Basic") {
      $config['toolbar'] = array(

         array( 'Source','-','Cut', 'Copy', 'PasteText', 'PasteFromWord', '-', 'Undo','Redo','-','BidiLtr', 'BidiRtl'),
          '/',

         array( 'Bold', 'Italic', '-', 'HorizontalRule', '-', 'NumberedList','BulletedList','-','OrderedList','UnorderedList','-','Link','Unlink','Anchor','-','About')

      );
   }

   // Set up the filemanager/image upload system.  Only Users and Admin can use this feature.
   $config['filebrowserBrowseUrl'] = 'includes/ckfilemanager/browser/default/browser.html?Connector='.$nukeurl.'/includes/ckfilemanager/connectors/php/connector.php';
   $config['filebrowserImageBrowseUrl'] = 'includes/ckfilemanager/browser/default/browser.html?Type=Image&Connector='.$nukeurl.'/includes/ckfilemanager/connectors/php/connector.php';
   $config['filebrowserFlashBrowseUrl'] = 'includes/ckfilemanager/browser/default/browser.html?Type=Flash&Connector='.$nukeurl.'/includes/ckfilemanager/connectors/php/connector.php';
   $config['filebrowserUploadUrl'] = $nukeurl.'/includes/ckfilemanager/connectors/php/upload.php?Type=File';
   $config['filebrowserImageUploadUrl'] = $nukeurl.'/includes/ckfilemanager/connectors/php/upload.php?Type=Image';
   $config['filebrowserFlashUploadUrl'] = $nukeurl.'/includes/ckfilemanager/connectors/php/upload.php?Type=Flash';

   
   if ($context['user']['is_logged']) {

      $CKEditor->Config['Enabled'] = true;  // for session checking --- "connector" enabled, but only for logged in members
      $CKEditor->Config['ImageBrowser'] = true;
      $CKEditor->Config['ImageUpload'] = true;
   } elseif ($context['user']['is_nukeadmin']) {

      $CKEditor->Config['Enabled'] = true;  // for session checking --- "connector" enabled, but only for logged in members
      $CKEditor->Config['ImageBrowser'] = true;
      $CKEditor->Config['ImageUpload'] = true;
      $CKEditor->Config['LinkBrowser'] = true;
      $CKEditor->Config['FlashBrowser'] = true;
      $CKEditor->Config['LinkUpload'] = true;
      $CKEditor->Config['FlashUpload'] = true;
   } elseif ($context['user']['is_guest']) { // guests are not allowed to see or do anything...
      $CKEditor->Config['Enabled'] = false;
      $CKEditor->Config['ImageBrowser'] = false;
      $CKEditor->Config['ImageUpload'] = false;
   }
   
    // Create editor instance.

   echo $CKEditor->editor($field_name, $value, $config);
} // end function text_editor
 
spottedhog







PostPosted: Mon Nov 28, 2011 8:48 pm Reply with quote

Forgot to mention...

There are a couple or three issues I ran up against in using CKEditor, and here are the fixes:

There is white space or indenting after the paragraph tag. To remove it ckeditor.js file needs some changes.

Go to line number 136. This is a very long line as are most lines in this file. Look for or search for "o.setRules" (without the quotes). Following that there is a list of items, indent, breakBeforeOpen, breakAfterOpen, breakBeforeClose, and breakAfterClose. Change or make sure indent and breakAfterOpen are set to 0 (zero).

Still in line number 136. After o.setRules('br',{breakAfterOpen:0}); add o.setRules('p',{breakAfterOpen:0});

Link for above: (I do not think the forum reply was for version 3.6.4)
http://cksource.com/forums/viewtopic.php?f=11&t=20511&hilit=spaces+after+paragraph

NEXT, I had trouble with \r\n being added or not removed AND recently a question mark was showing up in between paragraph tags. class.InputFilter.php is causing it, but I have not been able to track down how or where...

So, to that end I created a function that I use on text strings before it gets entered into the database. Here is the function code:

Code:
// CKEditor fix to remove \r\n for modules that "Preview" editor content 

// ALSO, convert <p>&nbsp;</p> to: <p> </p> sooo this: <p>?</p> does not get added to text string from the check_html function
function editorfix ($value) {
   
   // sometimes CKEditor wants to add \r\n, so replace it with a space
   // sometimes CKEditor wants to add <br />, but thus far, we cannot figure out when or how it shows up, so we are doing nothing... -- happens very infrequently
   $order   = array("\\r\\n", "\\n", "\\r", "<p>&nbsp;</p>");
   $replace = array(" ", " ", " ", "<p> </p>");
   $value = str_replace($order, $replace, $value);
   
   return $value;
}
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Fri Jun 01, 2012 3:08 am Reply with quote

kguske, I want to thank you for this integration. I think this is the most beautiful editor I ever see. Congratulations for this amazing integration but I do have a question. What should I do with this line of code you mention.

Code:
require_once INCLUDE_PATH . 'rnconfig.php';


Should I replace this code with this one?

Code:
require_once dirname(__FILE__) . '/rnconfig.php';


It was not so clear in the isntallation guide what to do with that code. Let me know asap plz. Danku
 
View user's profile Send private message
kguske







PostPosted: Fri Jun 01, 2012 5:15 am Reply with quote

Glad you like it, unicornio, but I must admit that Palbin did all the work on this.

I'll review the documentation - in which file are you considering this change?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> FCKeditor/WYSIWYG Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©