Magento Forum

   
Process wysiwyg filed in custom Module
 
shani1351
Sr. Member
 
Total Posts:  156
Joined:  2010-01-24
 

Hello,

I’ve created a Magento Module that contains a wysiwyg filed.
When I use the “Insert image” button of the wysiwyg I get this code:

<img src="{{media url=" wysiwyg/slide.jpg"}}" alt=""/>

with whitespace before the image path (this is how it works in the CMS as well).
I’m trying to process this filed using this code:

$contentToParse $slide->getImage(); 
    
$helper Mage::helper('cms');
    
$processor $helper->getBlockTemplateProcessor();
    
$html $processor->filter($contentToParse);

But it keeps the whitespace in the image path:

<img src="http://www.mydomain.com/media/ wysiwyg/slide1.jpg" alt=""/>

and the image is not showing.

How should I process this filed?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top