How to modify existing Smiley plugin in Liferay 7 CKeditor

Prerequisite:

As we know, Liferay 7 provides different WYSIWYG editors the portal. In this article we will modify the CKEditor plugins configurations. By default, on Liferay 7 fresh setup AlloyEditor is available in portal. We can change to CKEditor by setting following properties in porta-exp.properties file for different portlets.

Modify existing CKEditor plugin configurations:

We can also modify the configuration of the existing plugins by creating module with help of Liferay Document modifying an editor’s configuration.

Here, we will modify configuration of Smiley Plugin. We will remove some smiles.

Create module to modify plugin configuration for CKEditor. The steps has been explained in the Liferay Document modifying an editor’s configuration.a. In the steps in document, replace editor.name to ckeditor as we will configure plugin for CKEditor.

Now, as the smiley plugin already available in CKEditor in Liferay, we get following set of smileys with smiley descriptions which displays in tooltip. You can find this default configuration in smiley plugin.

Here, I have removed angry, heart, kiss and broken heart smiles from the JSON.

Done, After deploying this module in portal, only included smiles in JSON will be available.

INEXTURE known as leading Liferay consulting services provider in India, deliver the best in class solutions that improve the effectiveness and efficiency of the product. Our highly experienced team provides crucial process backbone and framework for every product and this will enable instant and collaborative application development.

Comments (2)

Hello,
Thank you for above tutorial. I will surely try to implement the same in coming days. However, I was trying to modify ckeditor in Liferay 7 by adding a button which allows the user to add video functionality. To do the same, I enabled Xuggler plugin, and the video button was seen in the editor and it worked properly. However, it did not allowed user to adjust alignment of the video. Thus, is it possible to write the code of our own custom plugin which supports video functionality and the same can be added to the Liferay 7 ckeditor as a button?
Please help.

Hi Taruchit Goyal,
Related to your question, Yes you can write the custom plugin for ckeditor 4 for the alignment and integrate the same in liferay 7, but it would be too much of extra efforts. Rather you can try to find some ckeditor 4 plugins like plugin which gives the ability to align the video. You can quickly check this with the basic integration of the ckeditor plugin in Liferay.