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

Change configuration of RichText field type

    XMLWordPrintable

Details

    Description

      In https://github.com/ezsystems/ezpublish-kernel/pull/1926 a new naming has been proposed, and we need to reflect this on the setting as well.

      Given custom tags have not been exposed yet in the product we can do this, but we should still add a BC note + upgrade note about the change.

      Today:

      ezrichtext:
      
          # Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".
          output_custom_tags:
      
          # Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".
          edit_custom_tags:
      
          # Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".
          input_custom_tags:
      
          # RichText template tags configuration.
          tags:
               key:
      

      Suggestion for discussion for this milestone:

      ezrichtext:
      
          # Simple custom template tags (xhtml5output twig template & attribute info) 
          custom_template_tags:
      
              # Prototype: Name of RichText template tag.
              # 'default' and 'default_inline' tag names are reserved for fallback.
              key:
      
                   # Template used for rendering RichText template tag.
                  template:
      
                   # Block mode, default is "block", alternative is "inline", for use by editor
                   block_mode:
      
                   # Tag configuration, arbitrary configuration is allowed here.
                   config:               ~
      
                   # Map of attributes
                   attributes:
                      # Prototype: Name of RichText custom attribute tag.
                      # Name is generated using keys and trasnlation system
                       key:
                           # Html Input Type (string, number, email, date, ...., but file, image, button, radio, reset, submit & checkbox not supported)
                           type: (string)
      
                           # Field is required
                           required: (bolean)
      
                           # Default value
                           value: (scalar)
      
                          ## TBD, might be milestone2, but these are native html5 concepts:
                          min: (scalar)
                          max: (scalar)
                          maxlength: (number)
                          minlength
                          pattern: (scalar)
                          size: (number)
                          # placeholder should use translation system?
       
      
                           
      

      Future milestone:

      ezrichtext:
      
          # Custom dockbook tags (XSL stylesheets & attribute info) 
          custom_dockbook_tags:
      
             # Prototype: Name of RichText template tag.
             # 'default' and 'default_inline' tag names are reserved for fallback.
             key:
                  # XSLT for translating storage format to ouput format (optional)
                  xslt_from_docbook_to_xhtml5output:
      
                  # XSLT for translating storage format to edit format (optional)
                  xslt_from_docbook_to_xhtml5edit:
      
                  # XSLT for translating edit format to storage format (optional)
                  xslt_from_xhtml5edit_to_docbook:
      
                   # Schema information is xsd or preferably in rng format.
                   schema:
      
                   # Tag configuration, arbitrary configuration is allowed here.
                   config:               ~
      
                   # Priority in the loading order. A high value will have higher precedence in overriding XSL templates.
                   priority:
      

      Open questions:
      1. Implied in suggested config structure there might be a custom template tag and custom docbook tag with same name, so we need to check if that is ok at all (this will for instance be an issue if there is a general block about adding classes to tags, or a need to identify tags by name if it does not get prefixed somehow)
      2. For output rendering, how to handle custom php logic when needed? (check how it is done currently and how it might be made extendable if it isn't already)
      3. Definition of custom attributes, and the implications that it should be used for server side validation before xsl transformation to storage format.
      4. Config for CSS for the tags would be needed to have some configuration somewhere, but might not be needed if it can be already done by registering css/js to be loaded using existing platform ui config
      5. ...

      Attachments

        Activity

          People

            Unassigned Unassigned
            andre.romcke-obsolete@ez.no André Rømcke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: