0
点赞
收藏
分享

微信扫一扫

富文本编辑器CKeditor


CKEditor简介

       富文本编辑器, 它提供类似于 Microsoft Word 的编辑功能,容易被不会编写 HTML 的用户并需要设置各种文本格式的用户所喜爱。例如CKEditor:

CKEditor包:

​​点击打开链接​​


操界面:




富文本编辑器CKeditor_html

 使用方法:



        ①(可忽略,直接看③,只是教你怎么看教程)可进入ckeditor文件夹-->samples文件夹-->打开index.html查看例子了解使用方法



富文本编辑器CKeditor_html_02



(可忽略,直接看③,只是教你怎么看教程) 例如查看“Replace textarea elements by class name ”方式-->右键查看源码



富文本编辑器CKeditor_富文本编辑器_03

         ③找到引入方式如下:




富文本编辑器CKeditor_html_04

         但是一般项目中使用CKeditor富文本编辑器,引入方式应该在页面<head>中引入核心文件ckeditor.js和sample.css写成下面的方式:


​​<!-- 引入ckeditor组件(给用户输入提供方便) -->​​​​  <script src="${pageContext.request.contextPath }/ckeditor/ckeditor.js"></script>​​​​  <link rel="stylesheet" href="${pageContext.request.contextPath }/ckeditor/samples/sample.css">​​


       然后在使用编辑器的地方插入html控件<textarea>,修改name为你需要的名字就可完成。


​​<textarea class="ckeditor" name="editor1"></textarea>

举报

相关推荐

0 条评论