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

Change representation of custom tags in xhtml5edit format

    XMLWordPrintable

Details

    • Icon: Story Story
    • Resolution: Fixed
    • Icon: High High
    • 1.9.0-beta1
    • None
    • Field types
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            damien.pobel-obsolete@ez.no Damien Pobel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: