1. rewrite adminhtml router:
<config> <admin> <routers> <adminhtml> <args> <modules> <Bysoft_Myfaq_Adminhtml before="Mage_Adminhtml">Bysoft_Myfaq_Adminhtml</Bysoft_Myfaq_Adminhtml> </modules> </args> </adminhtml> </routers> </admin> <adminhtml> <menu> <myfaq module="myfaq"> <title>FAQ</title> <sort_order>100</sort_order> <children> <myfaq module="myfaq"> <title>Manage FAQ</title> <sort_order>0</sort_order> <action>adminhtml/myfaq</action> </myfaq> </children> </myfaq> </menu> <acl> <resources> <all> <title>Allow Everything</title> </all> <admin> <children> <myfaq translate="title" module="myfaq"> <title>Myfaq</title> <sort_order>1000</sort_order> <children> <myfaq translate="title"> <title>Manage Myfaq</title> <sort_order>0</sort_order> </myfaq> </children> </myfaq> </children> </admin> </resources> </acl> <layout> <updates> <myfaq> <file>myfaq.xml</file> </myfaq> </updates> </layout> </adminhtml>
2. add css and js to adminhtml layout file:
<?xml version="1.0"?> <layout version="0.1.0"> <adminhtml_myfaq_index> <update handle="myfaq_index_index"/> <reference name="content"> <block type="myfaq/adminhtml_myfaq" name="myfaq" /> </reference> </adminhtml_myfaq_index> <adminhtml_myfaq_edit> <reference name="head"> <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="addCss"><name>lib/prototype/windows/themes/magento.css</name></action> </reference> </adminhtml_myfaq_edit> <adminhtml_myfaq_new> <reference name="head"> <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="addCss"><name>lib/prototype/windows/themes/magento.css</name></action> </reference> </adminhtml_myfaq_new> </layout>
3. enable wysiwyg_config in Bysoft_Myfaq_Block_Adminhtml_Myfaq_Edit_Tab_Form _prepareLayout function
<?php class Bysoft_Myfaq_Block_Adminhtml_Myfaq_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareLayout() { $return = parent::_prepareLayout(); if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) { $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true); } return $return; }
3. add wysiwyg field in Bysoft_Myfaq_Block_Adminhtml_Myfaq_Edit_Tab_Form class function _prepareForm()
protected function _prepareForm() { //.... $fieldset->addField('answer', 'editor', array( 'name' => 'description', 'label' => Mage::helper("myfaq")->__('Answer'), 'title' => Mage::helper("myfaq")->__('Answer'), 'style' => 'height:25em', 'wysiwyg' => true, 'required' => true, 'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(), )); //.... }
相关推荐
react-froala-wysiwyg, Froala所见即所得HTML富文本编辑器的反应组件 反应 JS Froala所见即所得编辑器 react-froala-wyswiyg为 Froala WYSIWYG编辑器版本 2提供了响应绑定。安装npm install react-froala-wysiwyg --
连接WYG插件gMA-Wysiwyg[2.900][6.800]-v1.220.rar
bootstrap-wysiwyg.jsbootstrap-wysiwyg.js
Azexo-Composer-WYSIWYG-master是一个能够在页面上通过进行需要的设置后自动的在页面中创建布局的代码。
富文本编辑器bootstrap-wysiwyg.min.js。可以充分发挥编辑器的优势
Vue JS Froala 所见即所得编辑器 vue-froala-wyswiyg 为 Froala WYSIWYG 编辑器版本 3 提供了 Vue 绑定。兼容性v1 以后@legacy Vue.js 1.x v2以后Vue.js 2.x安装从npm安装vue-froala-wysiwyg npm install vue-froala...
富文本编辑器控件
从npm安装angular-froala-wysiwyg npm install angular-froala-wysiwyg 您将需要CSS样式 <!-- index.html --> < link href =" node_modules/froala-editor/css/froala_editor.pkgd.min.css " rel =" ...
React JS Froala所见即所得编辑器 react-froala-wyswiyg提供对Froala WYSIWYG编辑器VERSION 3的React绑定。安装npm install react-froala-wysiwyg --save更新编辑器版本npm update froala-editor用法1.在应用程序...
兼容性v1以后@legacy Vue.js 1.x以后v2 Vue.js 2.x安装从npm安装vue-froala-wysiwyg npm安装vue-froala-wysiwyg-保存集成1.在内部需要并使用Froala Editor组件你的申请。 main.js文件://导入Froala编辑器import'...
mindmup-bootstrap-wysiwyg,html富文本编辑器
Laravel开发-bree-wysiwyg 布雷的WYSIWYG现场包
这个django应用程式在应用程式中使用bootstrap-wysiwyg编辑器。 它提供了一个表单小部件,可以轻松地将编辑器集成到您的表单中。 该小部件包含一些内联JavaScript,我计划在以后的版本中对此进行修复。 需要注意的...
composer require ddoe/wysiwyg-editor-module:^2.0.0 安装与OXID eShop v6.0兼容的最新发行版本composer require ddoe/wysiwyg-editor-module:dev-master 安装最新的未发布版本在composer命令期间,将询问您: ...
前端项目-angular-wysiwyg,AngularJS WYSIWYG editor
汉化版-jquery-wysiwyg在线文本编辑插件,只要将其替换插件里对应的文件即可进行中文提示编辑文本域
主要介绍了vue-froala-wysiwyg 富文本编辑器功能,分步骤给大家介绍了vue3.中如何安装使用froala,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
python库。资源全名:django-wysiwyg-redactor-ng-1.0.0.tar.gz
本文教大家如何使用bootstrap-wysiwyg文本编辑器,充分发挥编辑器的优势,希望大家可以有所收获。 主要特性: 超小5kb 自动的热键支持(MAC和windows) 拖放的插入图片,支持图片上传(支持手机拍照) 支持...