2020-05-01, 19:37:27
Hi,
In one of the items I am using a WYSIWYG field with the name description
and use this to output the contents on the front:
<?php
echo $my_item->fields->description->value;
?>
It's working ok with only text in the WYSIWYG editor, but as soon as I insert an image
the image does not show up on the front.
The image shows up correctly inside the WYSIWYG editor with this url:
<p><img alt="" src="http://localhost/items/data/uploads/my-company.png" style="float: left; width: 243px; height: 200px;" /></p>
But on the front the url shows up like is:
http://localhost/items/%22http://localhost/items/data/uploads/my-company.png%22
Any idea why the url on the front is wrong ?
In one of the items I am using a WYSIWYG field with the name description
and use this to output the contents on the front:
<?php
echo $my_item->fields->description->value;
?>
It's working ok with only text in the WYSIWYG editor, but as soon as I insert an image
the image does not show up on the front.
The image shows up correctly inside the WYSIWYG editor with this url:
<p><img alt="" src="http://localhost/items/data/uploads/my-company.png" style="float: left; width: 243px; height: 200px;" /></p>
But on the front the url shows up like is:
http://localhost/items/%22http://localhost/items/data/uploads/my-company.png%22
Any idea why the url on the front is wrong ?