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

Change representation of custom tags in xhtml5edit format

    Details

    • Type: Story Story
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.0-beta1
    • Component/s: Field types
    • Labels:
      None

      Description

      At the moment, custom tags in the xhtml5edit RichText format are represented by eztemplate (for block custom tag) and eztemplateinline (for inline custom tag) containing an ezcontent tag. Unfortunately, browsers are confused when a non HTML tag is used in the middle of an HTML snippet. So this should be changed so that the markup generated to represent a custom tag is (X)HTML valid.

      For instance, at the moment, a potential ezquote block custom tag is represented with the following code in xhtml5edit:

      <eztemplate data-ezname="ezquote">
          <ezcontent>
              <p>It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove.</p>
          </ezcontent>
          <span data-ezelement="ezconfig">
              <span data-ezelement="ezvalue" data-ezvalue-key="author">Antoine de Saint Exupéry</span>
          </span>
      </eztemplate>
      

      this would become:

      <div data-ezcustomtag="ezquote">
          <div data-ezcustomtagcontent>
              <p>It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove.</p>
          </div>
          <span data-ezelement="ezconfig">
              <span data-ezelement="ezvalue" data-ezvalue-key="author">Antoine de Saint Exupéry</span>
          </span>
      </div>
      

      In the case of an inline custom tag the 2 divs becomes 2 spans.

      For the record, pretty much the same was done for embed in https://github.com/ezsystems/ezpublish-kernel/pull/1435.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        2m 52s 1 damien.pobel@ez.no 05/Jan/17 2:47 PM
        Confirmed Confirmed Backlog Backlog
        60d 42m 1 André Rømcke 06/Mar/17 3:29 PM
        Backlog Backlog Development Development
        3s 1 André Rømcke 06/Mar/17 3:29 PM
        Development Development Development Review Development Review
        1h 26m 1 André Rømcke 06/Mar/17 4:56 PM
        Development Review Development Review Closed Closed
        3d 19h 5m 1 André Rømcke 10/Mar/17 12:01 PM

          People

          • Assignee:
            Unassigned
            Reporter:
            Damien Pobel (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: