Using the CKEditor in the Classic Web Server Added by ~Paul Minalitoden on August 3, 2010 | Version 1
|
|
The CK editor is used in xPages beginning with 8.5.2.
Although there is no support for the CK editor in the classic web server,
it can be "plugged in" in place of or in addition to the dojo editor.
In the classic web server, the javascript rich text editor controls are generated to the html output page
using html "templates" that reside in the domino server data directory.
Specifically
data-directory/domino/template/dojo- /dom_richtext.htm
New templates can be added to connect to different rich text editors using a combination
of template files, notes.ini settings and browser.cnf changes
(browser.cnf is in the domino-data directory)
Here is an example dom_richtext_ck.html file (it was built by copying and modifying
the dom_richtext.htm file)
Place this file in the data-directory/domino/template/dojo- directory
&DOMINO_CTRL_HEAD;
&DOMINO_CTRL_HEAD_END;
&DOMINO_CTRL_FORM_ID;&DOMINO_CTRL_FORMNAME;&DOMINO_CTRL_FORM_ID_END;
&DOMINO_CTRL_POST;GetJSEditorData()&DOMINO_CTRL_POST_END;
&DOMINO_CTRL_BODY;
&DOMINO_CTRL_BODY_END;
&DOMINO_CTRL_FLD_INIT;
&DOMINO_CTRL_FLD_INIT_END;
Then let the web server know about this file by adding a line to the server's notes.ini:
WebRichTextEditorTemplates=dom_richtext_ck.htm
Note: This INI can be a comma separated list of template names -- so you can have several custom templates
More below.
Finally, choose which browser(s) will use the editor and make an entry in the browser.cnf.
The rule below will use the dom_richtext_ck template for all Chrome, Safari, and MSIE browsers.
Note: you may want to restrict this based on browser version, especially for early version
of MSIE.
Property WebRichTextEditorTemplateID Number 0
Rule 1 Chrome
Rule 1 Safari
Rule 1 MSIE
The number value ("1" in the example) matches the relative position (starting at 1) of the control template in the
WebRichTextEditorTemplates list.
Note: values of WebRichTextEditorTemplateID > 0 overrides the design-time choice of rich text item editor
for any value other than "Using HTML" in the "Web Access : Display" peroerty.
So in the example above, the CK editor will be used for MSIE even it at design time it was set to
"Using Java Applet". |