开发用例

越诚云集成CKEditor文档说明

1.引用yc-cmsheaderfooter服务

$_service.get("cmsAdminHeaderPage")

模板内容

$_service.get("cmsAdminFooterPage")

 

2.模板内容中加入ckeditor静态资源引用

<script type="text/javascript" src="static/cmsAdminStatic/qiniuck/js/yc.js">script>

<script type="text/javascript" src="static/cmsAdminStatic/qiniuck/js/plupload.full.min.js">script>

<script type="text/javascript" src="static/cmsAdminStatic/qiniuck/js/qiniu.min.js">script>

<script type="text/javascript" src="static/cmsAdminStatic/qiniuck/ckeditor/ckeditor.js">script>

3.加入textarea文本输入框和初始化

<textarea name="intro" id="intro" >$!_processor.data.introtextarea>

初始化ckeditor

<script type="text/javascript">

//初始化

var editor = CKEDITOR.replace('intro',{

  "extraPlugins":"filebrowser,image,imagepaste,filetools",  

  "width":700,

  "height":300

});

//获取editor的输入内容  

$("#intro").val(editor.getData());

</script>