I have added an editor field in one of the custom forms by following code.
//Editor configuration
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array(
'add_variables' => false,
'add_widgets' => false,
'add_images' => false,
'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index')
));
//Editor field
$fieldset->addField('text', 'editor', array(
'label' => Mage::helper('masters')->__('Template Content'),
'class' => 'required-entry',
'required' => true,
'name' => 'text',
'config' => $wysiwygConfig,
'wysiwyg' => true
));
It displays images correctly in admin. But when I email content of editor field, images are not displayed. I tried to inspect image URL in email window and I got
http://localhost/magento/index.php/admin/cms_wysiwyg/directive/___directive/ef3tftZWfRpYSfBf1cffmw9Ind3eWcvdGf,/key/512fg8a4e56b1e6/
What am I doing wrong?