[CELUM-43] Cannot select CELUM assets from CK-Editor Created: 30/May/22 Updated: 08/Jun/22 Resolved: 02/Jun/22 |
|
| Status: | Closed |
| Project: | Celum DAM Connector |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Christopher Chard | Assignee: | Raphael Falvo |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Date of First Response: |
| Description |
|
When picking assets from CK Editor, since Magnolia 6.2.18, we expect to be able to see & pick both Magnolia DAM assets as well as CELUM assets. However, only Magnolia DAM assets are shown. Here is our ckeditor configuration from ui-module-core/src/main/resources/ui-module-core/webresources/ckeditor/config/ui-ckeditor-linking.js: /** * Used for UI CKEditor variants "ui-ckeditor-1-basic-field" and "ui-ckeditor-3-basic-area". * * Noteworthy places of CK Editor in magnolia: * CK Editor is defined in: magnolia-ui-vaadin-common-widgets-6.2.jar!/VAADIN/js/ckeditor * The default magnolia config is in: magnolia-ui-framework-6.2.jar!/mgnl-resources/ckeditor/config-magnolia.js * The class info.magnolia.ui.field.factory.RichTextFieldFactory handles the initialisation of the CK Editor * * Developers Info: When developing changes are only applied if you logout from admincentral and login again. */ var basePath = window.location.href.replace(/^[a-zA-Z]{3,5}\:\/{2}[a-zA-Z0-9_.:-]+\//, '/').replace(/\.magnolia.*/, '.resources/'); CKEDITOR.plugins.addExternal("magnoliaFileBrowser", CKEDITOR.vaadinDirUrl + "js/filebrowser/"); CKEDITOR.editorConfig = function (config) { //Remove unused plugins config.removePlugins = 'list,elementspath,filebrowser'; //Add additional plugins config.extraPlugins = 'magnolialink,magnoliaFileBrowser'; //Toolbar Layout var toolbar = [ {name: "basicstyles", items: ["Bold"]}, {name: "links", items: ["Link", "InternalLink", "DamLink", "Unlink"]}, {name: "actions", items: ["SpecialChar", "Superscript"]}, ]; config.toolbar = "linking"; config.toolbar_linking = toolbar; //Other configs config.disableNativeSpellChecker = true; config.enterMode = CKEDITOR.ENTER_P; config.shiftEnterMode = CKEDITOR.ENTER_BR; config.removeDialogTabs = 'link:advanced'; config.pasteFromWordRemoveStyles = true; config.pasteFromWordRemoveFontStyles = true; config.resize_enabled = false; config.autoParagraph = false; }; //Remove HTML Comments when pasting CKEDITOR.on('instanceReady', function (ev) { ev.editor.on('paste', function (evt) { var regex = /<\!--.*-->/g; var cleaned = evt.data.dataValue.replace(regex, ''); evt.data.dataValue = cleaned; }, null, null, 9); }); Here is our dialog definition using that CKEditor-Definition $type: uiRichTextField height: 250 configJsFile: /.resources/ui-module-core/webresources/ckeditor/config/ui-ckeditor-linking.js Also, really weird technical nodes are listed when I click on List View. No errors / no output are shown in log. |
| Comments |
| Comment by Raphael Falvo [ 31/May/22 ] |
|
Hello cchard , uiRichTextField seems to be a custom field in your project. I've tried with your ckeditor config together with a standard richTextField ($type: richTextField) and link chooser is displaying both JCR and Celum assets. I don't know the background and why you are using a custom field here, but in order to try identifying the root cause and making sure it's not the guilty one, could you please try using a regular richTextField and see how it goes ? Thanks. Raphaël |
| Comment by Christopher Chard [ 31/May/22 ] |
|
Great advice! I overlooked that we are using sthg custom here. It works with vanilla $type: richTextField ! |
| Comment by Raphael Falvo [ 02/Jun/22 ] |
|
Hi cchard Thanks for your feedback. Yes please create another one for this aspect, as current one looks to be fixed. You are right nevertheless, pagination was not in scope for the richText links. We will see what we can do there |
| Comment by Raphael Falvo [ 02/Jun/22 ] |
|
Works with regular RichTextField, but without pagination. Customer will create another ticket for this feature |
| Comment by Christopher Chard [ 08/Jun/22 ] |
|
See |