定制 zxbodya/yii2-tinymce 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zxbodya/yii2-tinymce

最新稳定版本:v2.0.0

Composer 安装命令:

composer require zxbodya/yii2-tinymce

包简介

Yii2 extension to use TinyMce with Compressor and FileManager

README 文档

README

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

统计信息

  • 总下载量: 32.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 2
  • 依赖项目数: 3
  • 推荐数: 1

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固