Installation ¶
The preferred way to install this extension is through composer.
Either run php composer.phar require "2amigos/yii2-ckeditor-widget" "*"
or add "2amigos/yii2-ckeditor-widget" : "*"
to the require section of your application's composer.json
file.
Skins & Plugins ¶
This widget works with default's dev-full/stable
branch of CKEditor, with a set of plugins and skins. If you wish to
configure a different skins or plugins that the one proposed, you will have to download them separately and configure
the widget's clientOptions
attribute accordingly.
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:
use dosamigos\ckeditor\CKEditor;
<?= $form->field($model, 'text')->widget(CKEditor::className(), [
'options' => ['rows' => 6],
'preset' => 'basic'
]) ?>
Using inline edition with basic preset:
use dosamigos\ckeditor\CKEditorInline;
<?php CKEditorInline::begin(['preset' => 'basic']);?>
This text can be edited now :)
<?php CKEditorInline::end();?>
Your code here...
Further Information ¶
Please, check the CKEditor plugin site documentation for further information about its configuration options.
Resources ¶
web development has never been so fun
www.2amigos.us
how to add plugins?
I have download a custom ckeditor version and replace in verder, but not work.
How to add plugins?
Custom build
Same here, as I may judge.
Downloaded a custom build. Do I just replace the corresponding vendor dir? What about updates then?
Thank you in advance
Example for saving
Is there an example for saving CKEditorInline? Would be very nice, thanks.
Composer install failed
Does this include CKEditor5?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.