1. 解压ueditor,放到项目的目录下
2. 修改配置ueditor.config.js,可以配置多个,不同功能不同的目录等,引入js的时候分别引入即可
window.UEDITOR_HOME_URL = '/uc/themes/qingdao/public/js/ueditor/'; var URL = window.UEDITOR_HOME_URL || getUEBasePath();
3. 需要使用ueditor的位置:
<div class="form-contain" > <textarea id="test-ueditor" name="notice_content"></textarea> </div> <script type="text/javascript" src="<?php echo __PUBLIC_THEME__;?>/js/ueditor/ueditor.config.js"></script> <script type="text/javascript" src="<?php echo __PUBLIC_THEME__;?>/js/ueditor/ueditor.all.min.js"></script> <script> var editor = new UE.ui.Editor(); editor.render('test-ueditor'); </script>