Hello bloomreach community and Jasper,
We’ve created a custom rich text CKEditor plugin and a new custom htmlprocessor that goes along with it.
The plugin saves some data in a non-standard attribute (e.g. extraData
) of a link tag, so we created an htmlprocessor to prevent it from being filtered and applied it to the compound containing the rich-text editor.
This plugin works perfectly when using the content document editor and saves the new attribute extraData
correctly, but when we try to use the plugin in the experience manager document editor (right side panel), the new attribute get filtered after saving.
So I wonder if there are different configurations for the document editor in the experience manager.
For e.g. something needs to be added to the hipposysedit:prototypes
as well.
This is what we use in the template of the compound:
/editor:templates:
jcr:primaryType: editor:templateset
/_default_:
jcr:primaryType: frontend:plugincluster
frontend:properties: [ mode ]
frontend:references: [ wicket.model, model.compareTo, engine, validator.id ]
frontend:services: [ wicket.id, validator.id ]
htmlprocessor.id: richtext-custom
/root:
jcr:primaryType: frontend:plugin
item: ${cluster.id}.field
plugin.class: org.hippoecm.frontend.service.render.ListViewPlugin
/text:
jcr:primaryType: frontend:plugin
caption: Text
field: text
plugin.class: org.hippoecm.frontend.editor.plugins.field.NodeFieldPlugin
wicket.id: ${cluster.id}.field
/cluster.options:
jcr:primaryType: frontend:pluginconfig
ckeditor.config.overlayed.json: '{
"toolbar": [
{ "name": "lists",
"items": [ "NumberedList", "BulletedList" ] },
{ "name": "clipboard",
"items": [ "Undo", "Redo" ] },
{ "name": "customlink",
"items": [ "LinkCustomLink", "UnlinkCustomLink" ] }
],
"enterMode": 2,
"autoParagraph": false,
"extraPlugins": "wordcount,customlink",
"removePlugins": "autolink,link",
"wordcount": { "showCharCount": true, "countSpacesAsChars": true }
}'
(We remove autolink and link because our new plugin also catches the on double click event on links, so they conflict.)