Server Side Integration"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(New page: == Server Side Integration == This document offers some guidelines that must be considered when developing server side integration for FCKeditor (alias Server Side Integration Pack). Ther...)
 
Line 7: Line 7:
 
* [[FCKeditor 2.x/Developers Guide/Server Side Integration#Quick Uploader|Quick Uploader]]
 
* [[FCKeditor 2.x/Developers Guide/Server Side Integration#Quick Uploader|Quick Uploader]]
 
* [[FCKeditor 2.x/Developers Guide/Server Side Integration#Samples|Samples]]
 
* [[FCKeditor 2.x/Developers Guide/Server Side Integration#Samples|Samples]]
 +
 +
This document will present the basic (minimum) features the integration must accomplish to. Any other feature is a welcome surplus. The scope of this document is to provide a generic pattern in the way the editor can have a homogeneous programming style even when being used from different languages.
 +
 +
== FCKeditor Creator ==
 +
 +
This is the main integration feature needed. It makes it possible to create an instance of FCKeditor in a page using the desired server side language. Object oriented programming (OOP) should be used wherever is possible. The Integration Pack should offer this functionality to the end user programmer:
 +
* Editor Instance Creation
 +
* Configuration and Settings
 +
* Automatic Browser Compatibility Detection:
 +
** Output HTML of the editor IFRAME for compatible browsers.
 +
** Output HTML of a simple TEXTAREA for not compatible browsers.
 +
 +
Suppose the editor instance is called "MyEditor". For compatible browsers the Integration Pack should output HTML like this:
 +
<pre>
 +
<div>
 +
<input type="hidden" id="MyEditor" name="MyEditor" value="initial value (HTML encoded) ">
 +
<input type="hidden" id="MyEditor___Config" value="Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded)">
 +
<iframe id="MyEditor___Frame" src="/FCKeditor/editor/fckeditor.html?InstanceName=MyEditor&Toolbar=Default" width="100%" height="200" frameborder="no" scrolling="no"></iframe>
 +
</div>
 +
</pre>
 +
While non compatible browsers should get:
 +
<pre>
 +
<div>
 +
<textarea name="MyEditor" rows="4" cols="40" style="WIDTH: 100%; HEIGHT: 200px" wrap="virtual">initial value (HTML encoded)</textarea>
 +
</div>
 +
</pre>
 +
=== FCKeditor Class ===
 +
 +
The Integration pack should usually offer a main class, called "FCKeditor", in a file called "fckeditor.ext" placed in the root of the editor's distribution package. To be able to use the class the end user should just include a "link" to that file and then easily create an instance of it. Obviously this is the common scenario for scripting languages. Other languages should just reflect this behaviour in the best way possible.
 +
 +
This is the basic structure of the FCKeditor Class:
 +
* '''Constructor'''
 +
** FCKeditor( instanceName )
 +
* '''Properties'''
 +
** InstanceName
 +
** Width
 +
** Height
 +
** ToolbarSet
 +
** Value
 +
** BasePath
 +
* '''Collections'''
 +
** Config (Only if possible to use collections)
 +
* '''Methods'''
 +
** Create()
 +
** CreateHtml() - return the HTML code to generate create the editor (if you don't want to Create it directly)
 +
** SetConfig( key, value ) (Only when not possible to use collections)
 +
he implementation should be based on the Javascript implementation (see fckeditor.js file). See "[[FCKeditor 2.x/Developers Guide/Integration/JavaScript|JavaScript Integration]]" for a complete explanation of the class elements.
 +
 +
== File Browser Connector ==

Revision as of 14:33, 18 January 2008

Server Side Integration

This document offers some guidelines that must be considered when developing server side integration for FCKeditor (alias Server Side Integration Pack). There are a few points of integration that every server side technology should have to be completely ready for FCKeditor. These are the main features:

This document will present the basic (minimum) features the integration must accomplish to. Any other feature is a welcome surplus. The scope of this document is to provide a generic pattern in the way the editor can have a homogeneous programming style even when being used from different languages.

FCKeditor Creator

This is the main integration feature needed. It makes it possible to create an instance of FCKeditor in a page using the desired server side language. Object oriented programming (OOP) should be used wherever is possible. The Integration Pack should offer this functionality to the end user programmer:

  • Editor Instance Creation
  • Configuration and Settings
  • Automatic Browser Compatibility Detection:
    • Output HTML of the editor IFRAME for compatible browsers.
    • Output HTML of a simple TEXTAREA for not compatible browsers.

Suppose the editor instance is called "MyEditor". For compatible browsers the Integration Pack should output HTML like this:

<div>
<input type="hidden" id="MyEditor" name="MyEditor" value="initial value (HTML encoded) ">
<input type="hidden" id="MyEditor___Config" value="Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded)">
<iframe id="MyEditor___Frame" src="/FCKeditor/editor/fckeditor.html?InstanceName=MyEditor&Toolbar=Default" width="100%" height="200" frameborder="no" scrolling="no"></iframe>
</div>

While non compatible browsers should get:

<div>
<textarea name="MyEditor" rows="4" cols="40" style="WIDTH: 100%; HEIGHT: 200px" wrap="virtual">initial value (HTML encoded)</textarea>
</div>

FCKeditor Class

The Integration pack should usually offer a main class, called "FCKeditor", in a file called "fckeditor.ext" placed in the root of the editor's distribution package. To be able to use the class the end user should just include a "link" to that file and then easily create an instance of it. Obviously this is the common scenario for scripting languages. Other languages should just reflect this behaviour in the best way possible.

This is the basic structure of the FCKeditor Class:

  • Constructor
    • FCKeditor( instanceName )
  • Properties
    • InstanceName
    • Width
    • Height
    • ToolbarSet
    • Value
    • BasePath
  • Collections
    • Config (Only if possible to use collections)
  • Methods
    • Create()
    • CreateHtml() - return the HTML code to generate create the editor (if you don't want to Create it directly)
    • SetConfig( key, value ) (Only when not possible to use collections)

he implementation should be based on the Javascript implementation (see fckeditor.js file). See "JavaScript Integration" for a complete explanation of the class elements.

File Browser Connector