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

Implement generic template rendered tags for RichText field type

    XMLWordPrintable

    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>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                petar.spanja@ez.no 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