Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Ashok Kumar
Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
28 de Setembro de 2010 03:24
Resposta

Ashok Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 27 de Setembro de 2010

Mensagens recentes

Hi all,

I am using Liferay 6.0.4 bundled with Tomcat 6.0.26 and am trying to insert a few custom styles in the style drop down of the FCK Editor. Could someone suggest me a development strategy please as I am confused with the options available.

Here is what I have tried so far:

1. Downloaded the source from svn but could not run ant build-ext as the target does not exist in build.xml. I am relatively new to Liferay development and could not find any steps for setting up the Liferay ext environment except for some contradicting pointers that it is not available in Liferay 6.x.

2. Thinking of creating a Hook through the plugin SDK but not sure if this is the right strategy for the task. Will the hook also deploy the modified fckstyles.xml or is it only for overriding a JSP or action class?

Please could someone provide a brief 'Steps to do' for the task.

Using liferay-plugins-sdk-6.0.5. Should that be SDK 6.0.4 for a Liferay 6.0.4 ?
Hitoshi Ozawa
RE: Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
28 de Setembro de 2010 19:17
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7954

Data de entrada: 23 de Março de 2010

Mensagens recentes

I'm not sure what you're trying to do with the plugin. Couldn't you just edit the FCK script files in the tomcat-6.0.26\webapps\ROOT\html\js\editor\fckeditor?

BTW, FCK is being replaced with CK.
Ashok Kumar
RE: Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
7 de Outubro de 2010 03:32
Resposta

Ashok Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 27 de Setembro de 2010

Mensagens recentes

Hi,

Many thanks for your pointer on the CKEditor. I am not sure whether Liferay6.0.4 starts with FCK or CK editor by default but the HTML source of the page contained references only to CKEditor. So I guess it is the CK Editor (screenshot attached) and assume that is why changes to the tomcat-6.0.26\webapps\ROOT\html\js\editor\fckeditor\fckstyles.xml did not reflect on the frontend.

However I tried figuring out where to insert the custom styles for CK editor but could not find a 'ckstyles.xml' or something similar inside tomcat-6.0.26\webapps\ROOT\html\js\editor\ckeditor.

So the questions would be:
1. How can we find out which editor is being displayed ? Where is this configured ?
2. In case it is a CK Editor, where would our custom styles and templates go ?
3. If any change to the editor is being done directly in the ROOT on our development workstation, will that suffice if we copy only the changed files to our test and production environments ?

Thanks a ton in advance for any help.

Regards,
Ashok
Anexo

Anexos: editor.jpg (43,1k)
Ashok Kumar
RE: Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
7 de Outubro de 2010 03:33
Resposta

Ashok Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 27 de Setembro de 2010

Mensagens recentes

Hi All,

Any pointers on this please ?
Oliver Bayer
RE: Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
7 de Outubro de 2010 04:17
Resposta

Oliver Bayer

Ranking: Liferay Master

Mensagens: 875

Data de entrada: 18 de Fevereiro de 2009

Mensagens recentes

Hi Ashok,

I'll try to answer at least some of your questions.

1. As you can see in the following snippet each portlet which uses a wysiwyg editor is defined in portal.properties and thus can be overriden in the portal-ext.properties.
 1##
 2## Editors
 3##
 4#
 5# You can configure individual JSP pages to use a specific implementation of
 6# the available WYSIWYG editors: ckeditor, fckeditor, liferay, simple,
 7# tinymce, or tinymcesimple.
 8#
 9editor.wysiwyg.default=ckeditor
10editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=ckeditor
11editor.wysiwyg.portal-web.docroot.html.portlet.calendar.edit_configuration.jsp=ckeditor
12editor.wysiwyg.portal-web.docroot.html.portlet.calendar.edit_event.jsp=ckeditor
13editor.wysiwyg.portal-web.docroot.html.portlet.enterprise_admin.view.jsp=ckeditor
14...


2. If you mean css changes with "styles" you can add them into your theme. Not sure what you meant with "templates"; if you want e.g. to modify the toolbar of the editor you can edit the ckconfig.jsp, create a new toolbar and change the toolbar name inside each portlet.

3. Look at my example in 2 to see what files you have to change too.

HTH Oli
Ashok Kumar
RE: Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
11 de Outubro de 2010 10:23
Resposta

Ashok Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 27 de Setembro de 2010

Mensagens recentes

Hi Oliver,

Many thanks for the help. I would have to try this in the morning and shall let you know how it goes.

By the way, by template I meant the custom html templates available as a dropdown for placement of images and text inside the wysiwyg editor.

Regards,
Ashok
Ashok Kumar
RE: Customizing FCK Editor in Liferay 6.0.4 - Development Strategy
12 de Outubro de 2010 17:20
Resposta

Ashok Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 27 de Setembro de 2010

Mensagens recentes

Hi Oliver,

Thanks a lot. This worked like a breeze.

For the benefit of other readers, I had to simply add the custom styles to the theme's custom.css and use those classes in the \liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\html\js\editor\ckeditor\ckconfig.jsp. There was also another folder ckeditor_diffs for which the purpose is unclear.

Thanks to Hitoshi for the hint regarding CK editor.

Regards,
Ashok