Details
-
Story
-
Resolution: Fixed
-
High
-
5.3-dev
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>