cancel
Showing results for 
Search instead for 
Did you mean: 

Product Custom Tab with Attribute WYSWYG shows broken image

Product Custom Tab with Attribute WYSWYG shows broken image

Hi,

 

I am running Magento CE 2.2.2 and I need to create another TAB in the product information page near the details and review tabs.

 

I created a new Attribute, named it "Tab". In the attribute, options set the input type to Text Area and enabled WYSIWYG Editor.

 

When I put Text in the field, the text shows fine. When I insert an image, in backend shows fine, but in frontend, it shows broken.

 

When inspected the code noticed that the code is generated wrong.

the code shows like this:

<img src="{{media url=" wysiwyg="" rohs-weee.jpg"}}"="" width="800" height="233">

when it should show like this:

<img src="http://10.1.1.30/Magento2.2.2/pub/media/wysiwyg/RoHS-WEEE.jpg" width="800" height="233">

 

I am thinking that I missed some link to convert the link from the editor to the actual link. Does anyone know how to fix this?

This is a link to download the code of my block: https://www.dropbox.com/s/xmi7pvkd206s7vd/Test_Tab.zip?dl=0