ckeditor-react-component-4
React component for CKEditor 4
Installation
Usage
; { superprops; thisupdateContent = thisupdateContent; thisstate = content: 'content' } { this } { console; var newContent = evteditor; this } { console; } { console; } { return <CKEditor activeClass="p10" content=thisstatecontent events= "blur": thisonBlur "afterPaste": thisafterPaste "change": thisonChange /> }
The package also includes an in-built example under the /example
folder. Run the sample application by cloning project and running npm start.
Props
name | type | default | mandatory | description |
---|---|---|---|---|
content | any | No | Default value to be set in CKEditor | |
onChange (Deprecated) | function | No | Deprecated in v1.0.6. Is now handled via events prop. | |
config | object | No | Configs to be passed in CKEditor | |
isScriptLoaded | boolean | false | No | Pass true if ckeditor script is already loaded in project |
scriptUrl | string | Standard CKEditor | No | The CKEditor script that needs to be loaded. Pass a custom script with plugins if you need a customized CKEditor. |
activeClass | string | No | Any Css class to be used with CKEditor container div. | |
events (New) | object | No | An object of custom event handlers so that you can listen to any CKEditor event (Added in v1.0.6) |
Note- Starting v1.0.6, you can listen to change
event directly by passing its event handler in events
prop instead of passing a separate onChange prop. The onChange prop is now deprecated.
License
ckeditor-react-component-4
is released under the MIT license
.