Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-5912

RichTextField - contentsCss in configJsFile not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 6.2.2
    • 6.2.1
    • None
    • Maintenance 11, Maintenance 12
    • 0

    Description

      When using the following configuration for a Rich text field in magnolia 6.2 the "contentCss"
      is not used in the head of the ck editor iframe.

      However when using the same configuration in magnolia 5.7.5 it is working as expected.

      CKEDITOR.editorConfig = function (config) {
          //Toolbar Layout
          var toolbar = [
              {name: "clipboard", items: ["Cut", "Copy", "Paste", "PasteText", "PasteFromWord"]},
          ];
          config.toolbar = toolbar;
          
      //CSS classes
          config.contentsCss = ['https://frontend.live/unionInvestment-website-frontend/develop-v4/resources/css/styles.all.min.css', 'https://frontend.live/unionInvestment-website-frontend/develop-v4/resources/css/styles.all2.min.css'];
      };
      

      there are no frontend, nor any backend errors logged.

      In Magnolia 6.2.1 I see the following ckeditor in the dialog. This dialog shows that the toolbar configuration is working:

      When looking at the html code, the configured resources (contentCss) are missing in the head of the iframe:

      Also when using the console to display the CKEditor variables the two entries "
      https://frontend.live/unionInvestment-website-frontend/develop-v4/resources/css/styles.all.min.css
      https://frontend.live/unionInvestment-website-frontend/develop-v4/resources/css/styles.all2.min.css
      are missing:

       

      Now when we look at magnolia 5.7.5 we see that it was working in this magnolia version:

      You can see that both css files are included in the head within the iframe:

      and here the console output of the variable:

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                fgrilli Federico Grilli
                viet.nguyen Viet Nguyen
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 1h 59m
                      1h 59m