Magento – wysiwyg in custom module, image links are incorrect

imagewysiwyg

I have a custom module, where I want to add wysiwyg editor to field.
I do it in this way:

    $fieldset->addField('submenu_html', 'editor', array(
        'name'      => 'submenu_html',
        'label'     => Mage::helper('cmsnav')->__('Submenu HTML'),
        'title'     => Mage::helper('cmsnav')->__('Submenu HTML'),
        'style'     => 'width:500px; height:400px;',
        'wysiwyg'   => true,
        'required'  => false,
        'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
    ));

In xml file I added all necessary JS and CSS files.
Editor is working, but then I upload image I get this kind of link:

<img src="http://linktoproject/index.php/admin/cms_wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvVW50aXRsZWQtMS5wbmcifX0,/key/13e9709bba938ba67ff4ab68cb24c7a969aa89da4039bd850d65204116d6e76a/" alt="" />

And I can see image only in Mozilla, in other browsers image doesn't load.
I checked config setting which I get on my module page and in CMS Static Block, they are same. Where can be problem? Thank you.

Best Answer

This is not a browser issue. More than that, it's not a bug, it's a feature. You have the Media Storage set to Database. If you change that to File System you should see the image src like {{media url="wysiwyg/Untitled-1.png"}}.
You can change this setting from System->Configuration->System->Storage Configuration for Media

Related Topic