FCKeditor has been around for more than six years. Since 2003 it has built a strong user community becoming the most used editor in the market, accumulating more than 3,5 million downloads. On 2009, decided renaming the editor, bringing to the light next generation solution: CKEditor 3.x.
CKEditor inherits the quality and strong features people were used to find in FCKeditor, in a much more modern product, added by dozens of new benefits, like accessibility and ultimate performance.
Why CKEditor 3.x? Standards support: W3C (WAI-AA and WCAG 1.0) , 508 (Section 508); Web accessibility is now reality. CKEditor is for everybody. http://ckeditor.com/.
Abstracted from the book: Liferay Portal 6 Enterprise Intranets (coming out soon)
In previous blogs, we have dicussed SCAYT - Spell Check as You Type – What and How in FCKEditor 2.6.5. And special thanks to Juan Fernández and Brian Chan who made CKEditor 3 integration for Liferay 6 a reality. Refer to LPS-5075.
This article will share how to configure SCAYT and CKEditor in Liferay portal 6.
It is very simple to use SCAYT and CKEditor in Liferay portal 6.
- locate the folder $PORTAL_ROOT_HOME/html/js/editor/ckeditor
- open the JSP file ckconfig.jsp
add following updates for CKEDITOR.config.toolbar_liferay and save it.
CKEDITOR.config.toolbar_liferay =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
In the same way, you would be able to enable CKEditor SCAYT in Liferay article toolbar (that is, CKEDITOR.config.toolbar_liferayArticle), edit-in-place toolbar (says, CKEDITOR.config.toolbar_editInPlace), and email toolbar (that is, CKEDITOR.config.toolbar_email) in JSP file ckconfig.jsp.
- Add following lines at the end of $PORTAL_ROOT_HOME/WEB-INF/classes/portal-ext.properties
#
editor.wysiwyg.default=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.calendar.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.enterprise_admin.view.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.invitation.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content_xsd_el.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.login.configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit_message.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.shopping.edit_configuration.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit.html.jsp=ckeditor
Then you would see following screenshot after restarting the portal.

- Click on the ckditor button "'Scayt'" to enable SCAYT - Spell Check as You Type.
- Then type your content, and click on the ckditor button 'SpellChecker' to check spelling. You would see following screenshot.

This is one of cool features in Liferay portal 6. Isn't it?


