Answer the question
In order to leave comments, you need to log in
Images not showing in choose, vova07/yii2-imperavi-widget?
Good afternoon.
Tell me, please, what am I doing wrong?
According to the documentation , I installed the editor, it works fine, but it does not display images in choose.
I upload them to blog.dev/frontend/web/uploads folder
Added to blog.dev/frontend/controllers/PostController.php
public function actions()
{
return [
'images-get' => [
'class' => 'vova07\imperavi\actions\GetAction',
'url' => '/uploads',
'path' => '@webroot/uploads',
'type' => GetAction::TYPE_IMAGES,
],
'image-upload' => [
'class' => 'vova07\imperavi\actions\UploadAction',
'url' => '/uploads',
'path' => '@webroot/uploads',
],
];
}
<?= $form->field($model, 'content')->widget(
Widget::className(), [
'settings' => [
'lang' => 'ru',
'minHeight' => 300,
'imageUpload' => Url::to(['/post/image-upload']),
'imageManagerJson' => Url::to(['/post/image-get']),
'plugins' => [
'fullscreen',
'table',
'video',
'fontsize',
'fontfamily',
'imagemanager',
]
]
]
) ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question