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

Embed element in RichText hidden when viewing and editing content

    Details

      Description

      Steps to reproduce

      1. Go to PlatformUI;
      2. Create a content type having a RichText field;
      3. Back to "Content Structure", create a content of the content type you just created with Rich Text field;
      4. Add an embed image to the Rich Text field
      5. Publish
      6. The Rich Text field will appear empty, but if you inspect with firebug

      <section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit"><div data-ezview="embed" id="yui_3_18_1_1_1445338149103_7919" data-href="ezcontent://106" data-ezelement="ezembed"></div></section>
      

        Issue Links

          Activity

          Pedro Resende (Inactive) created issue -
          Pedro Resende (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Pedro Resende (Inactive) made changes -
          Link This issue discovered while testing EZP-24894 [ EZP-24894 ]
          Damien Pobel (Inactive) made changes -
          Component/s Field types [ 10302 ]
          Component/s Platform/REST API v2 [ 10310 ]
          Hide
          Damien Pobel (Inactive) added a comment -

          This is the exact output of the REST API and we should add something inside that div. Now the question is, which part of the application should do that ?
          ping André Rømcke Petar Spanja Bertrand Dunogier

          Show
          Damien Pobel (Inactive) added a comment - This is the exact output of the REST API and we should add something inside that div. Now the question is, which part of the application should do that ? ping André Rømcke Petar Spanja Bertrand Dunogier
          Hide
          Bertrand Dunogier added a comment -

          That's a tough one...

          What does the REST API provide you with, as a markup language/domain ? Something meant to be edited ? If you take care of the display, I'm guessing that you would take care of putting something in the embed, but it's not that simple...

          Show
          Bertrand Dunogier added a comment - That's a tough one... What does the REST API provide you with, as a markup language/domain ? Something meant to be edited ? If you take care of the display, I'm guessing that you would take care of putting something in the embed, but it's not that simple...
          Hide
          Petar Spanja (Inactive) added a comment -

          Did we not discuss this in Lyon workshop? (I can't recall the details ATM

          Show
          Petar Spanja (Inactive) added a comment - Did we not discuss this in Lyon workshop? (I can't recall the details ATM
          Hide
          André Rømcke added a comment - - edited

          [~damien.pobel@ez.no] could you give us more context here? what is the format you expect in Editor in comparison?

          What we agreed on in the past was that content view is not a preview, it is rather more or less going to be showing a semantic view exactly like when editing (mainly w/o editing specific things).

          Show
          André Rømcke added a comment - - edited [~damien.pobel@ez.no] could you give us more context here? what is the format you expect in Editor in comparison? What we agreed on in the past was that content view is not a preview, it is rather more or less going to be showing a semantic view exactly like when editing (mainly w/o editing specific things) .
          Hide
          Damien Pobel (Inactive) added a comment - - edited

          well almost the same issue exists when editing (for the record, we use the same format) but the embed is almost visible (thanks to the "widget" CKEditor plugin) but still empty for the user so without meaning.
          André Rømcke And to answer your question, I expect the div representing the embed to have some content or an attribute I can put as content so that the end user knows which content is embed. So either:

          <div data-ezview="embed" data-href="ezcontent://106" data-ezelement="ezembed">Name of the content</div>
          

          or

          <div data-ezview="embed" data-href="ezcontent://106" data-ezelement="ezembed" data-content-name="Name of the content"></div>
          

          would work for me.

          The alternative is to load the embed content in PlatformUI (thanks to ezcontent://106) which is also possible but requires quite some work on PlatformUI side and has the downside of adding a delay before the editor can see which content is embed.

          Show
          Damien Pobel (Inactive) added a comment - - edited well almost the same issue exists when editing (for the record, we use the same format) but the embed is almost visible (thanks to the "widget" CKEditor plugin) but still empty for the user so without meaning. André Rømcke And to answer your question, I expect the div representing the embed to have some content or an attribute I can put as content so that the end user knows which content is embed. So either: < div data-ezview = "embed" data-href = "ezcontent://106" data-ezelement = "ezembed" >Name of the content</ div > or < div data-ezview = "embed" data-href = "ezcontent://106" data-ezelement = "ezembed" data-content-name = "Name of the content" ></ div > would work for me. The alternative is to load the embed content in PlatformUI (thanks to ezcontent://106) which is also possible but requires quite some work on PlatformUI side and has the downside of adding a delay before the editor can see which content is embed.
          Hide
          Petar Spanja (Inactive) added a comment -

          [~damien.pobel@ez.no] That makes it clear, I think we can add this to the Docbook->XHTML5Edit converter, making that data delivered from REST.

          Show
          Petar Spanja (Inactive) added a comment - [~damien.pobel@ez.no] That makes it clear, I think we can add this to the Docbook->XHTML5Edit converter, making that data delivered from REST.
          Hide
          Damien Pobel (Inactive) added a comment - - edited

          side note: the lack of content in the div representing the embed has also the side effect of confusing the browser if the embed element is followed by a paragraph, ie:

          <p>Before embed</p>
          <div data-ezview="embed" data-href="ezcontent://106" data-ezelement="ezembed"/>
          <p>After embed</p>
          

          is interpreted by the browser (both when viewing and editing) as:

          <p>Before embed</p>
          <div data-ezview="embed" data-href="ezcontent://106" data-ezelement="ezembed">
            <p>After embed</p>
          </div>
          

          so in the above comment the first solution would also avoid this bug.

          Show
          Damien Pobel (Inactive) added a comment - - edited side note: the lack of content in the div representing the embed has also the side effect of confusing the browser if the embed element is followed by a paragraph, ie: < p >Before embed</ p > < div data-ezview = "embed" data-href = "ezcontent://106" data-ezelement = "ezembed" /> < p >After embed</ p > is interpreted by the browser (both when viewing and editing) as: < p >Before embed</ p > < div data-ezview = "embed" data-href = "ezcontent://106" data-ezelement = "ezembed" > < p >After embed</ p > </ div > so in the above comment the first solution would also avoid this bug.
          Hide
          Petar Spanja (Inactive) added a comment -

          Ok, seems simply adding LIBXML_NOEMPTYTAG option when saving XML would solve that one.

          Show
          Petar Spanja (Inactive) added a comment - Ok, seems simply adding LIBXML_NOEMPTYTAG option when saving XML would solve that one.
          Hide
          André Rømcke added a comment - - edited

          But LIBXML_NOEMPTYTAG will mean he will get <br></br> which might cause other issues.
          Better if name is content of the div, can potentially be inside own tag (suggestions [~damien.pobel@ez.no]?) to future proof for additional meta data in the future.

          Show
          André Rømcke added a comment - - edited But LIBXML_NOEMPTYTAG will mean he will get <br></br> which might cause other issues. Better if name is content of the div, can potentially be inside own tag (suggestions [~damien.pobel@ez.no] ?) to future proof for additional meta data in the future.
          Damien Pobel (Inactive) made changes -
          Priority High [ 3 ] Low [ 5 ]
          Damien Pobel (Inactive) made changes -
          Priority Low [ 5 ] High [ 3 ]
          Hide
          Petar Spanja (Inactive) added a comment -

          Can the description here be updated in regard to the discussion, so that requirements of the client-side are made clear?

          Show
          Petar Spanja (Inactive) added a comment - Can the description here be updated in regard to the discussion, so that requirements of the client-side are made clear?
          Damien Pobel (Inactive) made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Damien Pobel (Inactive) made changes -
          Assignee Petar Spanja [ petar.spanja@ez.no ]
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25108 [ EZP-25108 ]
          Hide
          Damien Pobel (Inactive) added a comment -

          Actually, while working on adding images in the RichText editor, I figured out that this issue is a bit more complicated than just adding the content name in the embed element. Because in the case of an embed representing an image, I would need an <img> inside the embed div and/or something on the embed element saying "this embed represents an image in the editor" otherwise I have no way to discriminate an embed for image from a "normal" embed and I can not implement what is specified in https://doc.ez.no/display/PR/Online+Editor%3A+Scope (especially the custom toolbar to when giving the focus to an image).

          Show
          Damien Pobel (Inactive) added a comment - Actually, while working on adding images in the RichText editor, I figured out that this issue is a bit more complicated than just adding the content name in the embed element. Because in the case of an embed representing an image, I would need an <img> inside the embed div and/or something on the embed element saying "this embed represents an image in the editor" otherwise I have no way to discriminate an embed for image from a "normal" embed and I can not implement what is specified in https://doc.ez.no/display/PR/Online+Editor%3A+Scope (especially the custom toolbar to when giving the focus to an image).
          Damien Pobel (Inactive) made changes -
          Priority High [ 3 ] Critical [ 2 ]
          Hide
          Damien Pobel (Inactive) added a comment - - edited

          Without response, I choose to set the class ez-embed-type-image on the embed element representing an image in the editor in https://github.com/ezsystems/PlatformUIBundle/pull/436 (EZP-25108) but the problem of having empty embed remains.

          Show
          Damien Pobel (Inactive) added a comment - - edited Without response, I choose to set the class ez-embed-type-image on the embed element representing an image in the editor in https://github.com/ezsystems/PlatformUIBundle/pull/436 ( EZP-25108 ) but the problem of having empty embed remains.
          Bertrand Dunogier made changes -
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          Damien Pobel (Inactive) made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          Damien Pobel (Inactive) made changes -
          Link This issue is duplicated by EZP-25234 [ EZP-25234 ]
          Damien Pobel (Inactive) made changes -
          Assignee Petar Spanja [ petar.spanja@ez.no ]
          Bertrand Dunogier made changes -
          Epic Link EZP-22949 [ 11445 ]
          Damien Pobel (Inactive) made changes -
          Epic Link EZP-22949 [ 11445 ] EZP-25353 [ 52846 ]
          André Rømcke made changes -
          Fix Version/s Known Issues List [ 14512 ]
          Damien Pobel (Inactive) made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Assignee Damien Pobel [ damien.pobel@ez.no ]
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25088 [ EZP-25088 ]
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25088 [ EZP-25088 ]
          Damien Pobel (Inactive) made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/PlatformUIBundle/pull/514
          Damien Pobel (Inactive) made changes -
          Remote Link This issue links to "PR (Web Link)" [ 16206 ]
          Damien Pobel (Inactive) made changes -
          Summary Embed element in RichText hidden when viewing content Embed element in RichText hidden when viewing and editing content
          Show
          Damien Pobel (Inactive) added a comment - Merged in master in Merged in master in https://github.com/ezsystems/PlatformUIBundle/commit/2f6e7da74db4472cef9ce44b5e7845c393f150aa
          Damien Pobel (Inactive) made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Fix Version/s 2016.02 [ 14501 ]
          Assignee Damien Pobel [ damien.pobel@ez.no ]
          Rui Silva (Inactive) made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.
          Rui Silva (Inactive) made changes -
          Assignee Rui Silva [ rui.silva@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Rui Silva (Inactive) made changes -
          Link This issue testing discovered EZP-25494 [ EZP-25494 ]
          Rui Silva (Inactive) made changes -
          Link This issue testing discovered EZP-25495 [ EZP-25495 ]
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25917 [ EZP-25917 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 96337 ] EZEE Development Workflow [ 125214 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          12s 1 pedro.resende@ez.no 20/Oct/15 12:54 PM
          Confirmed Confirmed InputQ InputQ
          13d 7h 16m 1 damien.pobel@ez.no 02/Nov/15 7:11 PM
          InputQ InputQ Development Development
          101d 19h 46m 1 damien.pobel@ez.no 12/Feb/16 2:58 PM
          Development Development Development Review Development Review
          10d 2h 38m 1 damien.pobel@ez.no 22/Feb/16 5:36 PM
          Development Review Development Review Documentation Review done Documentation Review done
          22h 15m 1 damien.pobel@ez.no 23/Feb/16 3:51 PM
          Documentation Review done Documentation Review done QA QA
          19h 30m 1 rui.silva@ez.no 24/Feb/16 11:22 AM
          QA QA Closed Closed
          34m 20s 1 rui.silva@ez.no 24/Feb/16 11:56 AM

            People

            • Assignee:
              Unassigned
              Reporter:
              Pedro Resende (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: