Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30913

Having only a custom tag in a richtext field makes the editor stop working

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1. Implement a custom tag for the editor like the one in the docs: https://doc.ezplatform.com/en/latest/guide/extending_online_editor/#custom-tags
      2. Create a new article in the admin area
      3. Add the custom tag in the "Body" richtext field
      4. Select and remove (with the "trash" icon) the default paragraph that is at the top of the richtext field
      5. Click anywhere in the editor (in the white background)
      6. The contextual menu of the editor won't appear and a JavaScript exception is thrown, breaking the editor

      The error is:

       

      react-dom.production.min.js:117
      TypeError: Cannot read property 'elements' of null
       at EzToolbarAdd.setTopPosition (VM2200 ez-add.js:87)
       at EzToolbarAdd.componentDidUpdate (VM2200 ez-add.js:70)
       at qi (react-dom.production.min.js:130)
       at ui (react-dom.production.min.js:133)
       at react-dom.production.min.js:158
       at unstable_runWithPriority (react.production.min.js:27)
       at Vc (react-dom.production.min.js:158)
       at Sc (react-dom.production.min.js:158)
       at Z (react-dom.production.min.js:156)
       at Kc (react-dom.production.min.js:155)
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            vctr vctr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: