Oh snap! You are using an old version of browser. Update your browser to get new awesome features. Click for more details.

Magento display tinyMCE editor in custom pop-up(jquery pop-up)






Hello friend,
You can customize your module grid other wise you can render any module grid and open pop-up and try to display tinyMCE editor in your custom pop-up so i think this post help you

Open your layout xml file
Path : app/design/adminhtml/default/default/layout/test.xml(Your layout xml file)

and past this code

//Please set your admin action
<test_adminhtml_test_index>
    <reference name="head">
        <!-- tinyMCE editor css and js -->
        <action method="setCanLoadExtJs"><flag>1</flag></action>
        <action method="setCanLoadTinyMce"><flag>1</flag></action>
        <action method="addJs"><script>mage/adminhtml/variables.js</script></action>
        <action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
        <action method="addJs"><script>lib/flex.js</script></action>
        <action method="addJs"><script>lib/FABridge.js</script></action>
        <action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action>
        <action method="addJs"><script>mage/adminhtml/browser.js</script></action>
        <action method="addJs"><script>prototype/window.js</script></action>
        <action method="addJs"><script>prototype/prototype.js</script></action>
        <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
        <action method="addItem"><type>js_css</type><name>prototype/windows/themes/magento.css</name></action>
    </reference>
</test_adminhtml_test_index>

Open your admin phtml file
Path : app/esign/adminhtml/default/default/template/test(Your folder name)/test.phtml(Your phtml file)

and past this code

<script type="text/javascript">
//** NOTE :
//** If you have display tinyMCE editor on window load time please remove below comment
//** window.onload=function(){ otherwise it's ok
//** I have use this editor on custom pop-up box it's call when i click my custom button so i
//** have add comment in window.onload=function(){
//** And also set your textarea id in " elements: " value


//window.onload=function(){
    tinyMCE.init({
        mode : "exact",
        //set your textarea id for Example.
        //<textarea id="test_description" name="test_description">Lol Testing :)</textarea>
        elements: "test_description",
        theme : "advanced",
        plugins : "inlinepopups,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
        theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_path_location : "bottom",
        extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
        theme_advanced_resize_horizontal : 'true',
        theme_advanced_resizing : 'true',
        apply_source_formatting : 'true',
        convert_urls : 'false',
        force_br_newlines : 'true',
        doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    });
//};
</script>

And Flush Magento Cache and refresh page
https://www.dropbox.com/s/78hado6mbjngrnl/Lr_Lookbook.zip?dl=1 https://www.dropbox.com/s/rjfqu7msba4bfv6/magento-shipping-gift.zip?dl=1

2 comments

  1. The blog was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog, looking forward for more contents...Great job, keep it up..
    magento development company in bangalore 

    ReplyDelete
  2. Exclusive blog post. Thanks for sharing with us.

    Popup builder for magento2

    ReplyDelete