editor

–>step 1 = add js and css in Yourtheme->layout->page.xml below code

1
mage/adminhtml/variables.js
mage/adminhtml/wysiwyg/widget.js
lib/flex.js
lib/FABridge.js
mage/adminhtml/flexuploader.js
mage/adminhtml/browser.js
prototype/window.js
js_cssprototype/windows/themes/default.css
js_cssprototype/windows/themes/magento.css

— > step 2= add following code yourtheme->template->yourmodule->yourfilename.phtml


 <script language="javascript" type="text/javascript" src="js/tiny_mce/tiny_mce.js"> //< ![CDATA[ Event.observe(window, "load", function() { tinyMCE.init({ mode : "exact", theme : "advanced", width: "100%", elements : "short_description", 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 : "false", theme_advanced_resizing : "false", apply_source_formatting : "true", convert_urls : "false", force_br_newlines : "true", doctype : '' }); }); function showBlogEditor(strItemId){ strItemId = strItemId.id vartheeditor = tinyMCE.get(strItemId); //strItemId is the ID of the HTML element if(theeditor&&theteditor.initialized){ //you can do something here if you need }else{ tinyMCE.execCommand('mceAddControl', false, strItemId); } } function hideBlogEditor(strItemId){ if (tinyMCE.getInstanceById(strItemId)) { tinyMCE.execCommand('mceFocus', false, strItemId); tinyMCE.execCommand('mceRemoveControl', false, strItemId); } } //]]>

About Author:

Kalpesh Chavada

Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.

Kalpesh Author