CKEditorの使い方

1975 ワード


config.js
CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	config.language = 'zh-cn';
	config.uiColor = '#AADC6E';
	config.width = '100%';
	config.height = '300px';
	config.skin = 'office2003';
	config.toolbar = 'Full';
        config.toolbarCanCollapse = false;       //         
        config.autoUpdateElement = true;         //              ,            
	config.fullPage = true;                              //  html,head,link   
        config.removePlugins = 'elementspath';   //         
        config.resize_enabled = true;                  //                      
        //config.toolbar = 'Full';
    config.toolbar = [
        ['Cut','Copy','Paste','PasteText','PasteFromWord','Bold','Italic','Underline','Strike','Subscript','Superscript','TextColor','BGColor','Link','Unlink','Anchor'],
    	['Styles','Format','Font','FontSize']
    ];
};
       
   
 
html数:
 
<script type="text/javascript" src="/ckeditor/ckeditor/ckeditor.js"></script> 

<textarea cols="80" id="htmlcontent" name="htmlcontent">$!htmlcontent</textarea>
<input name="htmleditor" type="hidden" value="fck"/>
<div id="fckeditorwrapper">
<script type="text/javascript">   
      //      ,   
      CKEDITOR.config.language = '${sessionScope.language}-${sessionScope.country}';
      CKEDITOR.replace('htmlcontent');   
</script>