我尝试允许在 Product
描述中插入图片。我遵循了 help.hybris.com 上的官方文档。 Add image
功能的图标出现了。我可以上传图片,但该图片未显示在前端页面(产品详细信息页面
)上。它在后台描述字段中可见,因此已保存。
我还尝试按照同一手册中的建议启用 base64encoding,但没有帮助。
进行这些更改后,我确实运行了 ant clean all
,重新启动了 hybris 服务器并在后台运行了 REDEPLOY
。
这是我的custom-backoffice-config.xml
文件
<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>
...
似乎启用 base64
编码对我不起作用,但我看不出哪里出了问题。
我正在使用 Hybris 版本。 1811
最佳答案
原来在前端有一个函数可以过滤掉每个html标签。
所以我不得不改变它
${ycommerce:sanitizeHTML(product.description)}
对此
${product.description}
关于java - Hybris 后台 : Configuration for image in WYSIWYG doesn't work,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57609761/