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 to the forums!
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.
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)
Joined: Jun 05, 2006 Posts: 90 Location: Aachen / Germany
Posted:
Mon Jan 11, 2010 6:34 am
HI,
CKEditor 3.1 released!!!!
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....
Only registered users can see links on this board! Get registered or login to the forums!
Joined: Mar 11, 2007 Posts: 1536 Location: North Carolina
Posted:
Mon Jan 11, 2010 6:58 am
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....
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.
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.
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.
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(
// 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
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)
Only registered users can see links on this board! Get registered or login to the forums!
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> </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> </p>");
$replace = array(" ", " ", " ", "<p> </p>");
$value = str_replace($order, $replace, $value);
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