nh-ckeditor Just another CKEditor extension

  1. Documentation
  2. Change Log

Another CKEditor extension that uses the parameters based on CKEditor API.

-- Changes in version 0.1 --

  • Fix errors when using array as value in editorOptions
  • Add support for javascript code in editorOptions
Resources

Documentation

Requirements
  • Yii 1.0.5 or above
Installation
  • Extract the release file under protected/extensions
Usage

See the following code example:

$this->widget(
	'application.extensions.NHCKEditor.CKEditorWidget', 
	array(
		//	[Required] CModel object
		'model' => $model,
		'attribute' => 'ATTRIBUTE_NAME',
		
		//	[Optional] CSS file to be included
		'cssFile' => Yii::app()->request->baseURL.'/css/YOUR_FILE.css',
		
		//	[Optional] Options based on CKEditor API documentation
		'editorOptions' => array(
		    
		    //  Now supports PHP array and javascript code (must begin with js:)
		    
			//'width' => 800,
			//'height' => 480,
			//'language' => 'th',
			
			
			//'toolbar' => 'Full',              //	format #1:	String
            
            //'toolbar' => array(		        //	format #2:	PHP array
            //	array('Source', '-', 'Save')
            //),
            
            //'toolbar' => "js:[		        //	format #3:	javascript code
            //	['Source', '-', 'Save']
            //]",
            
			//'uiColor' => '',
			
			//	... your own options
		),
		
		//	[Optional] htmlOptions based on Yii implementation
		'htmlOptions' => array(
		    //
		),
	)
);

Change Log

December 18, 2009
  • Fix an error when using array as value in editorOptions (thanks @gazbond for his comment)
  • Add support for javascript code in editorOptions
November 2, 2009
  • Initial release. v0.1b
8 0
5 followers
2 249 downloads
Yii Version: 1.1
License: LGPL-3.0
Category: User Interface
Tags:
Developed by: PoohOka
Created on: Nov 2, 2009
Last updated: 8 years ago

Downloads

show all