<script src="/static/ueditor1.4.3/ueditor.config.js"></script> <script src="/static/ueditor1.4.3/ueditor.all.js"></script> <script src="/static/ueditor1.4.3/lang/zh-cn/zh-cn.js"></script> <textarea name="{$name}">{$val}</textarea> <script type="text/javascript"> $('textarea[name="{$name}"]').attr('id', 'editor_id_{$name}'); window.UEDITOR_HOME_URL = "/static/ueditor1.4.3/"; // window.UEDITOR_CONFIG.serverUrl = ''; window.UEDITOR_CONFIG.initialFrameHeight = parseInt({$height}); window.UEDITOR_CONFIG.scaleEnabled = true; window.UEDITOR_CONFIG.toolbars = [[ 'fullscreen',"source", 'undo', 'redo', 'fontfamily', 'fontsize', 'bold', 'italic', 'underline', 'strikethrough', 'removeformat', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', 'rowspacingtop', 'rowspacingbottom', 'lineheight', 'insertimage' ]]; window.UEDITOR_CONFIG.customDomain = true; window.UEDITOR_CONFIG.contextMenu = [ { label:'', //显示的名称 cmdName:'selectall',//执行的command命令,当点击这个右键菜单时 }, { label:'', //显示的名称 cmdName:'cleardoc',//执行的command命令,当点击这个右键菜单时 }, { label:'', //显示的名称 cmdName:'copy',//执行的command命令,当点击这个右键菜单时 }, { label:'', //显示的名称 cmdName:'paste',//执行的command命令,当点击这个右键菜单时 } ]; UE.getEditor('editor_id_{$name}'); </script>