2017 © Pedro Peláez
 

yii2-extension yii2-sir-trevor-js

Sir Trevor Editor for Yii2

image

perminder-klair/yii2-sir-trevor-js

Sir Trevor Editor for Yii2

  • Thursday, September 1, 2016
  • by perminder-klair
  • Repository
  • 3 Watchers
  • 7 Stars
  • 898 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 9 Forks
  • 2 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Sir Trevor Editor for Yii2

Sir Trevor Editor for Yii2, (*1)

Sir Trevor in action, (*2)

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist perminder-klair/yii2-sir-trevor-js "*"

or add, (*5)

"perminder-klair/yii2-sir-trevor-js": "*"

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

Usage

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

<?= $form->field($model, 'content')->widget(\kato\sirtrevorjs\SirTrevor::classname()); ?>

To Use Converter

Thanks to drmabuse!, (*8)

To echo out html content, in Yii2 active record do as done is following example:, (*9)

public function renderSirTrevor()
{
    $convertor = new \kato\sirtrevorjs\SirTrevorConverter();
    return $convertor->toHtml($this->content);
}

Then in view:, (*10)

echo $model->renderSirTrevor() 

To Upload Images

To upload Images, a demo file is included with extension actions/UploadAction.php, (*11)

Extend or copy it to your application and modify according to needs., (*12)

Include action in controller:, (*13)

public function actions()
{
    return [
        'upload' => [
            'class' => 'kato\actions\SirTrevorUploadAction',
        ],
    ];
}

Yii 1

This widget may be used in Yii 1 applications., (*14)

  1. Follow instructions on how to include Yii 2 in Yii 1 applications
  2. Include the widget as follows:
<?php $this->widget('\kato\sirtrevorjs\yii1compat\ESirTrevor', array(
    'model' => $model,
    'attribute' => 'content',
)); ?>

The Versions

01/09 2016

dev-master

9999999-dev

Sir Trevor Editor for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 sir-trevor-js

04/12 2014

v0.6.1

0.6.1.0

Sir Trevor Editor for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 sir-trevor-js

01/12 2014

v0.6.0

0.6.0.0

Sir Trevor Editor for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 sir-trevor-js

05/11 2014

v0.5.1

0.5.1.0

Sir Trevor Editor for Yii2

  Sources   Download

MIT

extension yii2 sir-trevor-js

05/11 2014

v0.5.0

0.5.0.0

Sir Trevor Editor for Yii2

  Sources   Download

MIT

extension yii2 sir-trevor-js