2017 © Pedro Peláez
 

yii2-extension yii2-tinymce

Yii2 extension to use TinyMce with Compressor and FileManager

image

vanquybn/yii2-tinymce

Yii2 extension to use TinyMce with Compressor and FileManager

  • Monday, February 5, 2018
  • by vanquybn
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

TinyMCE integration for Yii2

Yii2 extension to simplify tinymce wyiwyg editor usage in your application., (*1)

Provides:, (*2)

  • widget
  • compressor action
  • stub for integration with file managers like elFinder

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist vanquybn/yii2-tinymce "*@dev", (*5)

or add, (*6)

"vanquybn/yii2-tinymce": "*@dev", (*7)

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

Usage

Widget basic usage

$form->field($model, 'content')->widget(TinyMce::className())

Scripts Compressor Action

This can be used to optimize widget loading time., (*9)

At fist setup compressor action:, (*10)

public function actions()
{
    return [
        'tinyMceCompressor' => [
            'class' => TinyMceCompressorAction::className(),
        ],
    ];
}

Next add route to configured action to widget ooptions:, (*11)

$form->field($model, 'content')->widget(
    TinyMce::className(),
    ['compressorRoute' => 'test/tinyMceCompressor']
)

ElFinder Fille manager

At fisrt install vanquybn/yii2-elfinder extesion., (*12)

https://github.com/vanquybn/yii2-elfinder, (*13)

And configure connector action for it., (*14)

Next add file manager settings to widget:, (*15)

$form->field($model, 'content')->widget(
    TinyMce::className(),
    [
        'fileManager' => [
            'class' => TinyMceElFinder::className(),
            'connectorRoute' => 'el-finder/connector',
        ],
    ]
)

Spellchecker

TinyMce has bundled plugin for spellchecking but it requires backed to work..., (*16)

You can use yandex spellchecker service., (*17)

$form->field($model, 'content')->widget(
    TinyMce::className(),
    ['spellcheckerUrl'=>'http://speller.yandex.net/services/tinyspell']
)

More info about it here:, (*18)

http://api.yandex.ru/speller/doc/dg/tasks/how-to-spellcheck-tinymce.xml, (*19)

Or you can build own spellcheking service using code provided by moxicode: http://www.tinymce.com/download/download.php, (*20)

The Versions

05/02 2018

dev-master

9999999-dev

Yii2 extension to use TinyMce with Compressor and FileManager

  Sources   Download

MIT

The Requires

 

by Quinn Nguyen

extension yii2 tinymce wysiwyg