﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
880	Organize the code in namespaces	thecampbeln@…	Frederico Caldeira Knabben	"Hello all,
I have been taking a look at FCKeditor as an
HTMLArea control and I must say I really like what I
see. I am going to look into tweaking the code in order
place it in a YUI-esque class structure. I’d like to
detail what I’m looking at doing to see if you’d be
interested in integrating it back into the main project.
If you've not yet taken a look at YUI its got some
REALLY cool ideas -
http://developer.yahoo.com/yui/index.html. The best
thing I've learned from the YUI is its awesome use of
class structures. Basically, everything Yahoo has
released in its YUI is housed under a single 'global'
JavaScript variable named 'YAHOO'. So, if you want to
use the calendar, you access it via
'YAHOO.widget.Calendar', if you want to use the DOM
module, you access it via 'YAHOO.util.Dom'. I can see
that with fairly little effort, the FCKeditor could be
modified to work in the same fashion. For example...

{{{
var FCKeditor = function( instanceName, width, height,
toolbarSet, value )
}}}


would be changed to...


{{{
FCK.editor = function( instanceName, width, height,
toolbarSet, value )
}}}



Thanks to the FCKeditor's current use of JavaScript
objects (‘var FCKeditor = function’), it would be
pretty simple to modify it to function like the YUI.
Plus the only JavaScript naming restrictions users
would have to abide by is not having a
variable/function named 'FCK'.
I’ve used this idea with much success in one or my
own projects. All of my JavaScript now resides under a
single variable/class structure and I believe the
FCKeditor could also benefit.
Anyway… I’ve attached the base creator .js for the
FCK variable/class. If you’re interested in using this
idea throughout the project, please do let me know.
----
Moved from SF:[[BR]]
http://sourceforge.net/tracker/index.php?func=detail&aid=1478128&group_id=75348&atid=543656"	New Feature	closed	Normal	CKEditor 3.0	General		fixed	SF Confirmed V3ProtoStruct Review+	Frederico Caldeira Knabben
