Giter Site home page Giter Site logo

yii2-tinymce's Introduction

TinyMCE integration for Yii2

Yii2 extension to simplify tinymce wyiwyg editor usage in your application.

Extension is based on Yii 1.1 version: https://github.com/zxbodya/yii-tinymce

Provides:

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

##Installation The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist zxbodya/yii2-tinymce "*@dev"

or add

"zxbodya/yii2-tinymce": "*@dev"

to the require section of your composer.json file.

Usage

Widget basic usage

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

Scripts Compressor Action

This can be used to optimize widget loading time.

At fist setup compressor action:

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

Next add route to configured action to widget ooptions:

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

ElFinder Fille manager

At fisrt install zxbodya/yii2-elfinder extesion.

https://github.com/zxbodya/yii2-elfinder

And configure connector action for it.

Next add file manager settings to widget:

$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...

You can use yandex spellchecker service.

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

More info about it here:

http://api.yandex.ru/speller/doc/dg/tasks/how-to-spellcheck-tinymce.xml

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

yii2-tinymce's People

Contributors

atmoz avatar zxbodya avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.