We help IT Professionals succeed at work.

How do I configure the FCKEditor for Liferay 4.2?

jmc430
jmc430 asked
on
2,248 Views
Last Modified: 2008-01-09
Greetings,

I'm a liferay newbie and would like to learn the quickest and least painful method for implementing/configuring Editors in Liferay.  The documentation mentions that I can easily call the "portal.properties" file, but I cannot locate this particular file.  I've referenced the Liferay forums as well, to no avail.  Can anyone help me?

Any guidance or advice is greatly appreciated!

Best regards,
Jamie
Comment
Watch Question

Gibu GeorgeChief Technology Officer

Commented:
Hello jmc430,

You can do this in portal-ext.properties whose values can override the values in portal.properties, normally the portal-ext properties will be in WEB-INF/classes, if its not there you can create on and put, for the editor the default configuration  whatever is ther in portal.properties are

##
## Editors
##

    #
    # You can configure individual JSP pages to use a specific implementation of
    # the available WYSIWYG editors: liferay, fckeditor, simple, tinymce,
    # or tinymcesimple.
    #
    editor.wysiwyg.default=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.calendar.edit_configuration.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.enterprise_admin.view.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.invitation.edit_configuration.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content_xsd_el.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_configuration.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit_message.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_configuration.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.shopping.edit_configuration.jsp=fckeditor
    editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit_page.jsp=fckeditor

If you want ot configure the editor for another jsp you can add that jsps path as above and give the editor name in the portal-ext.properties


Regards,

gibu_george

Author

Commented:
Hi gibu_george,

Thanks for your response!   I initially implemented the fckeditor using a test.jsp file with the following text:

(copied from the newsgroups)
<script type="text/javascript" src='/html/js/editor/fckeditor/fckeditor.js'></sc
ript>
<script>
oFCKeditor = new FCKeditor( 'message_body' );
oFCKeditor.BasePath   = '/html/js/editor/fckeditor/' ;
oFCKeditor.Height = '400px' ;
oFCKeditor.Width = '800px' ;
window.onload = function() {
     oFCKeditor.ReplaceTextarea();
  };
</script>

which appears to be using a different fckeditor, with an array of different features:

1.             Preview functionality

2.             Form submissions (dropdown menu, text area, text field)

3.             Style Dropdown

4.             Format Dropdown menu

5.             Insert Page Break

6.             Maximize the editor size

Why is it that when I overwrite the portal-ext.properties file (setting the editor to fckeditor), that the fckeditor doesn't correspond to the same version I am seeing on my test.jsp?

Thanks,
jmc430

Chief Technology Officer
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
The navigation/tool bar is visibly different.  

The fckeditor that appears after passing the properties file parameters does not contain the following buttons:
Save
New Page
Preview
Templates
Print

Form Buttons:

Form (creates a new form template)
Checkbox Button (create a checkbox)
Radio Button (create a radio button)
Text field (creates)
Text area (creates)
Selection (creates a dropdown menu)
Button (creates a submit button)
Image Button (creates an image, different from insert an image button)
Hidden Field

Style Dropdown menu (ie, Title, custom bold, etc)
Format Button (dropdown, normal, formatted, address, etc)

If you like, I can send you a snapshot of the different navigation bars.

Thanks for helping me!

jmc430




Author

Commented:
This issue is unresolved.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.