Download the PHP package maxwen/yii2-ckeditor-widget without Composer
On this page you can find all versions of the php package maxwen/yii2-ckeditor-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maxwen/yii2-ckeditor-widget
More information about maxwen/yii2-ckeditor-widget
Files in maxwen/yii2-ckeditor-widget
Package yii2-ckeditor-widget
Short Description ckeditor widget for yii2 framework, with ckfinder intergrated
License MIT
Informations about the package yii2-ckeditor-widget
yii2-ckeditor-widget
CKEditor widget for yii2, support ckfinder,elfinder
This repo was forked from 2amigos/yii2-ckeditor-widget.
I made some customization.
Installation
Configuration
Inorder to add your custom configure,
you need to add an controllerMap to you config/main.php:
Then add you custom configure into params.php: see CKEditor.config
Usage
The library comes with two widgets: CKEditor
and CKEditorInline
. One is for classic edition and the other for inline
editing respectively.
Using a model with a basic preset:
Using inline edition with basic preset:
How to add custom plugins
This is the way to add custom plugins to the editor. Since version 2.0 we are working with the packagist version of the CKEditor library, therefore we are required to use its configuration API in order to add external plugins.
Lets add the popular Code Editor Plugin for example. This plugin would allow us to add a button to our editor's toolbar so we can add code to the content we are editing.
Assuming you have downloaded the plugin and added to the root directory of your Yii2 site. I have it this way:
+ frontend + -- web + -- pbckcode
We can now add it to our CKEditor widget. For this example I am using CKEditorInline
widget. One thing you notice on
this example is that we do not use the preset attribute; this is highly important as we want to add a customized toolbar to our
widget. No more talking, here is the code:
About CKFinder
CKFinder is a commercial software, this repo just contains a demo version, you can purchase the full version here.
Further Information
Please, check the CKEditor plugin site documentation for further information about its configuration options.