bajadev / yii2-ckeditor
Yii2 CKEditor
Installs: 37 919
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 67
Language:JavaScript
Type:yii2-extension
Requires
This package is not auto-updated.
Last update: 2025-03-05 04:09:44 UTC
README
CKEditor for Yii2 with file manager & upload
Install with composer:
"bajadev/yii2-ckeditor": "*"
or
composer require bajadev/yii2-ckeditor "*"
Controller:
public function actions()
{
return [
'browse-images' => [
'class' => 'bajadev\ckeditor\actions\BrowseAction',
'quality' => 80,
'maxWidth' => 800,
'maxHeight' => 800,
'useHash' => true,
'url' => '@web/contents/',
'path' => '@frontend/web/contents/',
],
'upload-images' => [
'class' => 'bajadev\ckeditor\actions\UploadAction',
'quality' => 80,
'maxWidth' => 800,
'maxHeight' => 800,
'useHash' => true,
'url' => '@web/contents/',
'path' => '@frontend/web/contents/',
],
];
}
View:
<?php echo $form->field($model, 'content')->widget(CKEditor::className(), [
'editorOptions' => [
'preset' => 'full', /* basic, standard, full
'inline' => false,
'filebrowserBrowseUrl' => 'browse-images',
'filebrowserUploadUrl' => 'upload-images',
'extraPlugins' => 'imageuploader',
],
]); ?>