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

Implement generic template rendered tags for RichText field type

    Details

      Description

      RichText field type should provide generic tags rendered through the templating component.
      Both inline and block level tag should be provided.

      These tags should accept configuration in the form of arbitrary hash structure, same as is implemented for embeds: https://github.com/ezsystems/ezpublish-kernel/pull/758

      Template used for rendering of the tag and configuration hash should be configurable in YAML.
      Hash configuration would be used in the future by the online editor.
      Template should be mapped from the name (attribute) of the tag.
      Both template and configuration should be overridable through YAML configuration.

      Example (internal format):

      <eztemplate name="blockquote">
        <ezcontent>That is the real Amber down there, isn't it?</ezcontent>
        <ezconfig>
          <ezvalue key="cite">Roger Zelazny</ezvalue>
          <ezvalue key="book">Sign of the Unicorn</ezvalue>
        </ezconfig>
      </eztemplate>
      

      Rendered by default with eZPublishCoreBundle:ezrichtext:custom.html.twig:

      <p>Default rendering for template tag "blockquote":</p>
      <p>That is the real Amber down there, isn't it?</p>
      

      Or configured to be rendered with custom template:

      system:
          eng:
              ezrichtext:
                  blockquote:
                      config:
                          cite: Enter quote author here
                          book: [Sign of the Unicorn, The Hand of Oberon]
                      template: eZUserBundle:ezrichtext:blockquote.html.twig
      

      as:

      <blockquote>
       <p>That is the real Amber down there, isn't it?</p>
       <footer>— <cite>Roger Zelazny</cite></footer>
      </blockquote>
      

        Issue Links

          Activity

          Hide
          Roland Benedetti added a comment -

          Hi Petar,
          This is all good but actually should be a story in Jira, not a feature.
          Can you move it and I'l place on the top of the backlog?

          Cheers,
          Roland

          Show
          Roland Benedetti added a comment - Hi Petar, This is all good but actually should be a story in Jira, not a feature. Can you move it and I'l place on the top of the backlog? Cheers, Roland
          Hide
          Petar Spanja (Inactive) added a comment -

          @Roland Benedetti

          Hi, it is converted to story now.

          Show
          Petar Spanja (Inactive) added a comment - @ Roland Benedetti Hi, it is converted to story now.
          Show
          Petar Spanja (Inactive) added a comment - Pull request: https://github.com/ezsystems/ezpublish-kernel/pull/779
          Show
          Petar Spanja (Inactive) added a comment - Merged in ezpublish-kernel/master: https://github.com/ezsystems/ezpublish-kernel/commit/a9312687b18e1facc97a89f56c2ab8e0335d4372
          Hide
          Pedro Resende (Inactive) added a comment -

          Tested and approved by Q.A.

          Show
          Pedro Resende (Inactive) added a comment - Tested and approved by Q.A.

            People

            • Assignee:
              Unassigned
              Reporter:
              Petar Spanja (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 1 hour, 45 minutes
                1w 3d 1h 45m