Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: EditorConfigContributor only applies to first AlloyEditor
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.
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
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™