index.jsp主要代碼:
<html> <head> <title>網頁編輯器</title> <script type="text/javascript" charset="utf-8" src="./ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="./ueditor/ueditor.all.js"></script> <LINK rel=stylesheet href="ueditor/themes/default/ueditor.css">
<script> <span style="white-space:pre"> </span>window.UEDITOR_HOME_URL = "/ueditor03/ueditor"; </script>
</head> <body> <div align="center"> <textarea id="newsEditor" name="content"> </textarea> <br/> <script type="text/javascript"> var editor = new UE.ui.Editor({initialFrameHeight:1000,initialFrameWidth:1000 }); editor.render('newsEditor'); /* UE.getEditor('newsEditor'); 上面的代碼是設置網頁編輯器的寬和高的,也就是大小。沒有要求的話直接引用備註裏的代碼就能夠 */ </script> </div> </body> </html>