这个标题其实可以改为如何使用ueditor编辑器,和TP关系不大.
1、ueditor存放在tp根下的Data目录下,即/www/blog/Data/Ueditor
2、以下在使用ueditor的模板中操作;
头部添加一段JS:
- <script type="text/javascript">
- window.UEDITOR_HOME_URL ="__ROOT__/Data/Ueditor/";//指出ueditor的存放路径
- window.onload=function(){
- UE.getEditor('content');//要传入一个ID才能显示编辑器,即textarea中的id //开源软件:Vevb.com
- }
- < /script>
引入两个JS文件:
<js file="__ROOT__/Data/Ueditor/ueditor.config.js" />
<js file="__ROOT__/Data/Ueditor/ueditor.all.js" />
ueditor版本为 ueditor1_4_3,我看网上及下载的实例要引入的js文件为ueditor.all.min.js而非ueditor.all.js,不知道我为什么使用ueditor.all.min.js调取不出来编辑器,ueditor.all.js却可以显示,有知道的还请告知.
新闻热点
疑难解答
图片精选