当前位置: 代码迷 >> Java相关 >> TinyMCE(1)
  详细解决方案

TinyMCE(1)

热度:176   发布时间:2016-04-22 19:51:19.0
TinyMCE(一)

Simple theme example

 

 1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 <% 3 String path = request.getContextPath(); 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 %> 6  7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 8 <html> 9 <head>10     <script type="text/javascript" src="<%=path %>/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>11     <script type="text/javascript">12         tinyMCE.init({13             mode : "textareas",14             theme : "simple"15         });16     </script>17 </head>18 <body>19 20 <form method="post" action="${pageContext.request.contextPath }/DemoServlet">21     <h3>Simple theme example</h3>22 23     <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->24     <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">25             This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.26     </textarea>27 28     <br />29     <input type="submit" name="save" value="Submit" />30     <input type="reset" name="reset" value="Reset" />31 </form>32 </body>33 </html>