Uploaded image for project: 'Celum DAM Connector '
  1. Celum DAM Connector
  2. CELUM-43

Cannot select CELUM assets from CK-Editor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Blocker
    • None
    • None
    • None

    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.

      Checklists

        Acceptance criteria

        Attachments

          1. screenshot-1.png
            screenshot-1.png
            46 kB
          2. screenshot-2.png
            screenshot-2.png
            7 kB
          3. screenshot-3.png
            screenshot-3.png
            75 kB
          4. screenshot-4.png
            screenshot-4.png
            12 kB

          Activity

            People

              rfalvo Raphael Falvo
              cchard Christopher Chard
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: