富文本编辑器

 

    1.  

      首先,下载CKEditor源码。到 CKEditor官网进行下载。然后将下载的文件进行解压。

    2.  

      打开解压后的文件,将 ckeditorWebContentckeditor  目录下的文件复制到工程目录

      新建一个JSP页面编写代码:

       <form action="<%=path %>/result.jsp" method="post">
          <textarea cols=’50’  rows=’3’  class="ckeditor" name="txtContent"></textarea>
          <input type="submit" value="提交">
          </form>

      在另一个页面:

      <%
         request.setCharacterEncoding("utf-8");
        %>
         <textarea class="ckeditor" name="mycontent"><%=request.getParameter("txtContent") %></textarea>
        </body>

      实现界面:

       提交之后:

 
 
原文地址:https://www.cnblogs.com/jingpeipei/p/5638241.html