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

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: