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

As an Editor, I want to attach links to images in RichText Editor

    Details

    • Sprint:
      [2.4] - Sprint 5
    • Story Points:
      1

      Description

      Currently, there is no way to attach links to images in RichText Editor. It could be configured as an additional button in the toolbar, similar to adding links to the highlighted text.

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment -

          FYI : The ezxmltext to richtext conversion scripts currently transform such links like this:

          ezxmltext:

          <?xml version="1.0" encoding="utf-8"?>
          <section
              xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
              xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
              xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
              <paragraph>kake 
                  <link xhtml:title="custom title" xhtml:id="customID" url_id="8">
                      <embed view="embed" size="medium" object_id="126" custom:offset="0" custom:limit="5"/>
                  </link>
              </paragraph>
          </section>
          

          richtext:

          <?xml version="1.0" encoding="UTF-8"?>\n  
          <section
              xmlns="http://docbook.org/ns/docbook"
              xmlns:xlink="http://www.w3.org/1999/xlink"
              xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
              xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
              <para>kake </para>
              <ezembed xlink:href="ezcontent://126" view="embed" ezxhtml:class="ez-embed-type-image">
                  <ezlink xlink:href="ezurl://8" xlink:show="none" xlink:title="custom title" xml:id="customID"/>
                  <ezconfig>
                      <ezvalue key="size">medium</ezvalue>
                      <ezvalue key="offset">0</ezvalue>
                      <ezvalue key="limit">5</ezvalue>
                  </ezconfig>
              </ezembed>
          </section>
          

          The xhtml transformations are ignoring that <ezlink> so html output does not include the links

          Show
          Vidar Langseid added a comment - FYI : The ezxmltext to richtext conversion scripts currently transform such links like this: ezxmltext: <?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph>kake <link xhtml:title="custom title" xhtml:id="customID" url_id="8"> <embed view="embed" size="medium" object_id="126" custom:offset="0" custom:limit="5"/> </link> </paragraph> </section> richtext: <?xml version="1.0" encoding="UTF-8"?>\n <section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0"> <para>kake </para> <ezembed xlink:href="ezcontent://126" view="embed" ezxhtml:class="ez-embed-type-image"> <ezlink xlink:href="ezurl://8" xlink:show="none" xlink:title="custom title" xml:id="customID"/> <ezconfig> <ezvalue key="size">medium</ezvalue> <ezvalue key="offset">0</ezvalue> <ezvalue key="limit">5</ezvalue> </ezconfig> </ezembed> </section> The xhtml transformations are ignoring that <ezlink> so html output does not include the links
          Hide
          Vidar Langseid added a comment -

          Petar Španja, Petar Španja : Any input on why you introduced the <ezlink> tag inside <ezembed> instead of simply using the docbook <link> around <ezembed: <link ...><ezembed>...</ezembed></link> ?

          Show
          Vidar Langseid added a comment - Petar Španja , Petar Španja : Any input on why you introduced the <ezlink> tag inside <ezembed> instead of simply using the docbook <link> around <ezembed : <link ...><ezembed>...</ezembed></link> ?
          Show
          Petar Španja added a comment - @ Vidar Langseid I wanted to avoid repeating mistakes from XmlText, for example see: https://github.com/ezsystems/ezplatform-xmltext-fieldtype/tree/master/tests/lib/FieldType/Converter/_fixtures/expanding AFAIR the idea was to have the link available in the embed template: https://github.com/ezsystems/ezplatform-richtext/blob/master/src/lib/eZ/RichText/Converter/Render/Embed.php#L159
          Hide
          Katarzyna Zawada added a comment -

          QA Approved.

          Show
          Katarzyna Zawada added a comment - QA Approved.
          Show
          Andrzej Longosz added a comment - Merges: ezsystems/ezplatform-admin-ui#726 merged into master as ezsystems/ezplatform-admin-ui@59c6341 ezsystems/ezpublish-kernel#2492 merged into master as ezsystems/ezpublish-kernel@4ab79de ezsystems/ezplatform-richtext#20 merged into master as ezsystems/ezplatform-richtext@c4aa555

            People

            • Assignee:
              Unassigned
              Reporter:
              Konrad Oboza
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile