Foros de discusión

Customize HTML Editor Of Liferay

thumbnail
Mohammad Hejazi, modificado hace 9 años.

Customize HTML Editor Of Liferay

New Member Mensajes: 6 Fecha de incorporación: 9/11/14 Mensajes recientes
Hello
Please Help Me
How To Add Customize Fonts To Default HTML Editor Of Liferay?

Archivos adjuntos:

thumbnail
Byrån Zaugg, modificado hace 9 años.

RE: Customize HTML Editor Of Liferay

Expert Mensajes: 252 Fecha de incorporación: 6/04/12 Mensajes recientes
For the CKEditor config portion, it's relatively easy to add inline styles or classes. Follow the guides here:


For the Portal portion, you'll need to create a hook which adds your new styles to the CKEditor config files. I'm not the most familiar with hooks. But the files you'll want to modify/hook are maybe:
  • portal-web\docroot\html\js\editor\ckeditor\ckconfig.jsp
  • portal-web\docroot\html\js\editor\ckeditor\ckconfig_bbcode.jsp
  • portal-web\docroot\html\js\editor\ckeditor\ckconfig_creole.jsp

For custom fonts, like the ones you'd get from Typekit or Google Fonts you'll need to include those in some stylesheet somewhere. Maybe your theme? I'm not sure on this.

However it's done, I'd suggest you only use classes in the CKEditor style config and do all your styles in a stylesheet. It'll make it much easier to modify later.
Nikolay Karadzhov, modificado hace 6 años.

RE: Customize HTML Editor Of Liferay

New Member Mensaje: 1 Fecha de incorporación: 21/11/17 Mensajes recientes
Hello,

I have the following problem: I created the hook and added "from liferay" the ckeditor jsp's. Then I changed ckconfig.jsp in order to add the new style. However no changes had an effect on the editor, no style was added. I even tried removing a style - no effect again. I have restarted the application several times and still - no effect. What I found till now is that it's not only me with the same problem.

It would be great if someone help me with this issue.