Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eddycjy/yii2-ueditor
Yii2 widget for ueditor
https://github.com/eddycjy/yii2-ueditor
php ueditor yii yii2-ueditor
Last synced: about 2 months ago
JSON representation
Yii2 widget for ueditor
- Host: GitHub
- URL: https://github.com/eddycjy/yii2-ueditor
- Owner: eddycjy
- Created: 2017-11-03T08:33:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-05T01:50:03.000Z (about 7 years ago)
- Last Synced: 2024-04-17T01:22:42.799Z (8 months ago)
- Topics: php, ueditor, yii, yii2-ueditor
- Language: PHP
- Homepage:
- Size: 2.46 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yii2-ueditor
# Requirements
- PHP >= 5.4.0
- Composer
- Yii2# Installation
``` sh
composer require eddycjy/yii2-ueditor "@dev"
```# Configuration
## Use File
Add to configs file
- yii-basic : config/web.php
- yii-advanced: common/config/main.php
``` php
'modules' => [
'ueditor' => [
'class' => 'Ueditor\UeditorModule',
],
],```
or change ue-configs, upload folder root_path **@app/web**
``` php
'modules' => [
'ueditor' => [
'class' => 'Ueditor\UeditorModule',
'imageUrlPrefix' => '',
'imagePathFormat' => '/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}',
'scrawlUrlPrefix' => '',
'scrawlPathFormat' => '',
'snapscreenUrlPrefix' => '',
'snapscreenPathFormat' => '',
'catcherUrlPrefix' => '',
'catcherPathFormat' => '',
'videoUrlPrefix' => '',
'videoPathFormat' => '',
'fileUrlPrefix' => '',
'filePathFormat' => '',
'imageManagerUrlPrefix' => '',
'imageManagerListPath' => '',
'fileManagerUrlPrefix' => '',
'fileManagerListPath' => '',
],
],
```# Usage
Config view/form
``` php
= $form->field($model, 'content')->widget(\Ueditor\Widgets\Ueditor::className()) ?>
```or widget
``` php
= \Ueditor\Widgets\Ueditor::widget([]) ?>
```or config advanced ueditor reference [Docs](http://fex.baidu.com/ueditor/#start-config)
``` php
= \Ueditor\Widgets\Ueditor::widget([
'id' => 'content',
'options' => [
'initialFrameWidth' => 666,
],
]) ?>
```# License
MIT