ckeditor引入笔记
1.首先下载ckeditor_3.3.2.zip
2.解压后部署到项目目录下面 查看simple ckeditor/_samples/replacebyclass.html 案例
<textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
引入ckeditor 这个文件
<script type="text/javascript" src="../ckeditor.js"></script>
3.一般选用方式
<script type="text/javascript" src="../ckeditor.js"></script>
<textarea cols="80" id="editor2" name="editor2" rows="10">
<script type="text/javascript">
//<![CDATA[
// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace( 'editor2' );
//]]>
</script>
根据ID来replace
4.注意
<script type="text/javascript">
function initEditor(){
CKEDITOR.replace( 'content',
{
skin : 'office2003',
width:700
}
);
}
</script>
</head>
<body onload="initEditor()">
5.相关内容查看官网 https://ckeditor.com/

浙公网安备 33010602011771号