RE: EditorConfigContributor only applies to first AlloyEditor

thumbnail
Aldo De Vleeschauwer, modified 6 Years ago. Junior Member Posts: 35 Join Date: 3/9/11 Recent Posts

Hi,

 

I have created a custom EditorConfigContributor, as described in the tutorial Modifying an editor's configuration, for the Journal Article portlet.

It modifies the Styles shown and works correctly for the first AlloyEditor on a page BUT when I add a second editor (using a repeatable structure field) the Styles menu shown in this second editor is the original one and not the one as changed by the EditorConfigContributor.

 

Has anyone already seen this behavior ?

 

This is on Liferay 7.0.

 

Thanks,

Aldo.

thumbnail
Aldo De Vleeschauwer, modified 6 Years ago. Junior Member Posts: 35 Join Date: 3/9/11 Recent Posts

And the solution is to add a second portlet name:

 

"javax.portlet.name=com_liferay_dynamic_data_mapping_web_portlet_DDMPortlet"

 

So

 @Component(
        property = {
                "editor.name=alloyeditor",
                "javax.portlet.name =" + JournalPortletKeys.JOURNAL,
                "javax.portlet.name =" + DDMPortletKeys.DYNAMIC_DATA_MAPPING,
                "service.ranking:Integer=100" },
        service = EditorConfigContributor.class)
public class TextAlignmentEditorConfigContributor extends BaseEditorConfigContributor {

 

Thanks Liferay support,

Aldo