rob006/yii-tinymce

为Yii 1.1提供TinyMCE编辑器集成的扩展。

2.0.1 2024-01-17 10:48 UTC

This package is auto-updated.

Last update: 2024-09-17 12:17:52 UTC


README

一个为Yii 1.1提供与TinyMce编辑器基本集成的Yii扩展。

基于https://github.com/zxbodya/yii-tinymce

安装

通过composer安装此扩展是首选方式。

运行以下命令:

composer require rob006/yii-tinymce

或者将以下内容添加到您的composer.json文件的require部分:

"rob006/yii2-tinymce": "^2.0"

to the require section of your composer.json file.

使用方法

基本用法

<?php $this->widget('TinyMceWidget', [
	'model' => $model,
	'attribute' => 'value',
]) ?>

使用自定义设置以及与YiistrapelFinder扩展集成的用法。

<?= $form->textAreaControlGroup($model, 'value', ['rows' => 6, 'span' => 8,]) ?>
<?php $this->widget('TinyMceWidget', [
	'model' => $model,
	'attribute' => 'value',
	'dry_run' => true,
	'fileManager' => [
		'class' => 'TinyMceElFinder',
		'popupConnectorRoute' => 'pageAssetsPopup',
		'popupTitle' => 'Files',
	],
	'settings' => [
		'content_css' => $this->getEditorStyles(),
	],
]) ?>

资源