Search code examples
javawysiwygsap-commerce-cloudbackoffice

Hybris backoffice: Configuration for image in WYSIWYG doesn't work


I tried to allow inserting images in Product description. I followed official docs at help.hybris.com. An icon for Add image function appeared. I am able to upload the image, however the image is not shown on the frontend page (Product detail page). It's visible in the backoffice description field, so it's saved.

I also tried to enable base64encoding as suggested in the same manual, but it didn't help. After I made those changes, I did run ant clean all, restarted hybris server and run REDEPLOY in the Backoffice.

This is my custom-backoffice-config.xml file

  <context merge-by="type" parent="GenericItem" type="Product" component="editor-area">
        <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
            <editorArea:tab name="hmc.tab.product.properties">
                <editorArea:section name="hmc.product.descriptions">
                        <editorArea:attribute editor="com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.wysiwyg)" qualifier="description" merge-mode="replace">
                            <editorArea:editor-parameter>
                                <editorArea:name>base64Encoded</editorArea:name>
                                <editorArea:value>true</editorArea:value>
                            </editorArea:editor-parameter>
                        </editorArea:attribute>
                        <editorArea:attribute qualifier="summary" merge-mode="remove"/>
                </editorArea:section>
            </editorArea:tab>
...

It looks like enabling of base64 encoding is not working for me, but I'm not able to see what's wrong there.

I'm using Hybris ver. 1811


Solution

  • Turns out there was a function on the frontend which filtered out every html tags.
    So I hade to just change it from this

    ${ycommerce:sanitizeHTML(product.description)}
    

    to this

    ${product.description}