jreinke / magento-highlighter

Add Syntax Highlighting to Magento Admin
32 stars 10 forks source link

multiple wysiwyg #6

Open teckfui opened 8 years ago

teckfui commented 8 years ago

There's an issue when there's more than one wysiwyg editor appear on the same page, the content is being copied to another textarea. e.g wysiwyg A contain text "abc" and wysiwyg B contain text "cba", if i edit wysiwyg A to "def", both content A and B will be changed to "def" when I save it.

aurmil commented 8 years ago

exact same problem with Magento 1.9.2.1

jreinke commented 8 years ago

Do you have an example page where the bug appears please?

aurmil commented 8 years ago

can't find in basic Magento install for me, it was in a custom module, 2 WYSIWYG fields in the same form

        $fieldset->addField('short_description', 'editor', array(
            'name' => 'short_description',
            'label' => Mage::helper('...')->__('Short Description'),
            'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(array(
                'add_variables' => false,
                'add_widgets' => false,
                'add_images' => false,
            )),
            'wysiwyg' => true
        ));

        $fieldset->addField('content', 'editor', array(
            'name' => 'content',
            'label' => Mage::helper('adminhtml')->__('Contents'),
            'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
            'wysiwyg' => true,
            'required' => true,
        ));
teckfui commented 8 years ago

A good example is to install the AW Blog extension and go to create a new blog post page on admin

http://ecommerce.aheadworks.com/free-stuff/blog.html

http://ecommerce.aheadworks.com/media/catalog/product/cache/1/thumbnail/9df78eab33525d08d6e5fb8d27136e95/a/d/add_post1_1_1.png

TomFranssen commented 7 years ago

We are experiencing the exact same issue Magento ver. 1.14.3.2

I have created a fix that makes sure the editor can be used multiple times on the same page.