Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2732

CKEditor doesn't update the height of the parent container

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Tool Voting
    • Labels:
      None
    • Environment:
      FF, Chrome

      Description

      Hey Marcin, can you please have a look at this issue?

      Voting Tool's Authoring. Press on a pencil icon to edit any nomination and you won't be able to see part of an area with CKEditor and save button.
      However, this works ok when you press "Create nomination" button.

      I investigated this a bit and the difference caused by
      <script type="text/javascript">
      // an awful place to put javascript code,
      // but only after processing CKEditor tag above there is CKEDITOR object defined
      CKEDITOR.on('instanceReady', function(e){
      if (e.editor.element.$.id == 'newNomination'){
      window.parent.resizeOnMessageFrameLoad();
      }
      });
      </script>

      so should we place this peace of code in all other cases as well? (I suspect some other tools too)

        Activity

        Hide
        marcin Marcin Cieslak added a comment -
        Rather than copying code everywhere, a more generic approach has been implemented.
        CKEditor tag has now a new optional attribute "resizeParentFrameName".
        If it is provided, once the editor instance is ready, a frame with the provided name is searched for in the parent window. If it is found, it gets height adjusted so it can fit all its content.
        This attribute can be applied to any <CKEditor> tag instances we need.
        Show
        marcin Marcin Cieslak added a comment - Rather than copying code everywhere, a more generic approach has been implemented. CKEditor tag has now a new optional attribute "resizeParentFrameName". If it is provided, once the editor instance is ready, a frame with the provided name is searched for in the parent window. If it is found, it gets height adjusted so it can fit all its content. This attribute can be applied to any <CKEditor> tag instances we need.
        Hide
        dronych Andrey Balan added a comment -
        Cool! Sounds smart

        Dziękuję
        Show
        dronych Andrey Balan added a comment - Cool! Sounds smart Dziękuję
        Hide
        marcin Marcin Cieslak added a comment -
        Fixed by modifying CKEditor tag.
        Show
        marcin Marcin Cieslak added a comment - Fixed by modifying CKEditor tag.
        Hide
        dronych Andrey Balan added a comment -
        Works perfect! closing it
        Thanks Marcin
        Show
        dronych Andrey Balan added a comment - Works perfect! closing it Thanks Marcin

          People

          • Assignee:
            marcin Marcin Cieslak
            Reporter:
            dronych Andrey Balan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development