yii2-roxymce RoxyMce - Beautiful File manager for Tinymce

RoxyMce - Beautiful File manager for Tinymce

  1. Install
  2. Configure & Usage
  3. Configure module
  4. Screenshot
  5. Resource
  6. Bugs & Issues

This allow to integrate TinyMce 4 with Roxy File Manager

Install

Preferred way to install this extension through composer
Either run ~~~ composer require navatech/yii2-roxymce "^2.0" ~~~ Or add to require section of composer.json then run composer update ~~~ "navatech/yii2-roxymce" : "^2.0" ~~~

Configure & Usage

Configure module

Property
  • uploadFolder the directory where stored file. Default is @app/web/uploads/images. If folder not existed, roxy will auto-create it.
  • defaultView display type. Default is thumb
  • dateFormat Datetime format. Default is Y-m-d H:i. See: http://php.net/manual/en/function.date.php
  • rememberLastFolder would you want to remember last folder? Default is true
  • rememberLastOrder would you want to remember last order? Default is true
  • allowExtension allowed files extension. Default is jpeg jpg png gif mov mp3 mp4 avi wmv flv mpeg webm
Example

Add to config file: `

'modules' => [
	'roxymce' => [
		'class' => 'navatech\roxymce\Module',
		'uploadFolder' => '@frontend/web/uploads/images',
	],
],

## Widget Usage

### Property
* `model` Instance of Model|ActiveRecord. **Required** if `name` has not been defined.
* `attribute` attribute name in your model. **Required** if `name` has not been defined & when `model` has been defined.
* `name` input's name. **Required** if `model` & `attribute` has not been defined.
* `value` default value of tinymce. **Not required** Default is value of `$model->$attribute` or `empty` when not using `model` section
* `action` default is ` Url::to(['/roxymce/default/index'])` **Not required**
* `options` default options of textarea. **Not required**. See: [Html::textarea()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#textarea()-detail)
* `clientOptions` Tinymce options. **Not required**. See: https://www.tinymce.com/docs/
  * `title` Title bar of roxymce iframe. **Not required**

### Example
In your view file, call roxymce widget
#### Include ActiveRecord Model

```php
echo \navatech\roxymce\widgets\RoxyMceWidget::widget([
	'model'     => app\models\Post::findOne(1),
	'attribute' => 'content',
]);
Sample HTML without ActiveRecord Model
echo \navatech\roxymce\widgets\RoxyMceWidget::widget([
	'name' => 'Post[content]'
]);

Screenshot

roxymce

Resource

Bugs & Issues

Found some bugs? Just create an issue or fork it and send pull request

0 0
2 followers
0 downloads
Yii Version: 2.0
License: MIT
Category: Others
Developed by: TuoiTeen
Created on: Feb 21, 2016
Last updated: 8 years ago

Related Extensions