2017 © Pedro Peláez
 

yii2-extension yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

image

weison-tech/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 84 Forks
  • 0 Open issues
  • 28 Versions
  • 0 % Grown

The README.md

Imperavi Redactor Widget for Yii 2

Imperavi Redactor Widget is a wrapper for Imperavi Redactor, a high quality WYSIWYG editor., (*1)

Note that Imperavi Redactor itself is a proprietary commercial copyrighted software but since Yii community bought OEM license you can use it for free with Yii., (*2)

Install

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

$ php composer.phar require --prefer-dist weison-tech/yii2-imperavi-widget "*"

or add, (*5)

"weison-tech/yii2-imperavi-widget": "*"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code:, (*7)

Like a widget

echo \vova07\imperavi\Widget::widget([
    'name' => 'redactor',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen'
        ]
    ]
]);

Like an ActiveForm widget

use vova07\imperavi\Widget;

echo $form->field($model, 'content')->widget(Widget::className(), [
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen'
        ]
    ]
]);

Like a widget for a predefined textarea

echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen'
        ]
    ]
]);

Add images that have already been uploaded

// DefaultController.php
public function actions()
{
    return [
        'images-get' => [
            'class' => 'vova07\imperavi\actions\GetAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'type' => GetAction::TYPE_IMAGES,
        ]
    ];
}

// View.php
echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'imageManagerJson' => Url::to(['/default/images-get']),
        'plugins' => [
            'imagemanager'
        ]
    ]
]);

Add files that have already been uploaded

// DefaultController.php
public function actions()
{
    return [
        'files-get' => [
            'class' => 'vova07\imperavi\actions\GetAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'type' => GetAction::TYPE_FILES,
        ]
    ];
}

// View.php
echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileManagerJson' => Url::to(['/default/files-get']),
        'plugins' => [
            'filemanager'
        ]
    ]
]);

Upload image

// DefaultController.php
public function actions()
{
    return [
        'image-upload' => [
            'class' => 'vova07\imperavi\actions\UploadAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path' // Or absolute path to directory where files are stored.
        ],
    ];
}

// View.php
echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'imageUpload' => Url::to(['/default/image-upload'])
    ]
]);

Upload file

// DefaultController.php
public function actions()
{
    return [
        'file-upload' => [
            'class' => 'vova07\imperavi\actions\UploadAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'uploadOnlyImage' => false, // For not image-only uploading.
        ],
    ];
}

// View.php
echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileUpload' => Url::to(['/default/file-upload'])
    ]
]);

Add custom plugins

echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen'
        ]
    ],
    'plugins' => [
        'my-custom-plugin' => 'app\assets\MyPluginBundle'
    ]
]);

Testing

bash $ phpunit, (*8)

Further Information

Please, check the Imperavi Redactor documentation for further information about its configuration options., (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

Credits

License

The BSD License (BSD). Please see License File for more information., (*11)

YiiWheels
Available also on YiiWheels, (*12)

The Versions

18/05 2016

dev-master

9999999-dev https://github.com/weison-tech/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

18/05 2016

1.2.11

1.2.11.0 https://github.com/weison-tech/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

10/12 2015

1.2.10

1.2.10.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

21/08 2015

1.2.9

1.2.9.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

30/07 2015

1.2.8

1.2.8.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

29/06 2015

1.2.7

1.2.7.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

11/06 2015

1.2.6

1.2.6.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

29/05 2015

1.2.5

1.2.5.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

29/05 2015

1.2.4

1.2.4.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

13/05 2015

1.2.3

1.2.3.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

03/04 2015

1.2.2

1.2.2.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

30/03 2015

1.2.1

1.2.1.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

08/03 2015

1.2.0

1.2.0.0 https://github.com/vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 widget wysiwyg imperavi redactor

02/03 2015

1.1.12

1.1.12.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

01/03 2015

1.1.11

1.1.11.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

01/03 2015

1.1.10

1.1.10.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

01/03 2015

1.1.9

1.1.9.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

25/01 2015

1.1.8

1.1.8.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

25/01 2015

1.1.7

1.1.7.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

15/12 2014

1.1.6

1.1.6.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

02/12 2014

1.1.5

1.1.5.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

17/11 2014

1.1.4

1.1.4.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

06/11 2014

1.1.3

1.1.3.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

24/10 2014

1.1.2

1.1.2.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

13/10 2014

1.1.1

1.1.1.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

29/09 2014

1.1.0

1.1.0.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

19/08 2014

1.0.1

1.0.1.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor

05/07 2014

1.0.0

1.0.0.0

The imperavi redactor widget for Yii framework.

  Sources   Download

proprietary

The Requires

 

by Veaceslav Medvedev

yii2 yii 2 widget wysiwyg imperavi redactor