srnden / yii2-alloy-editor
Yii2 Alloy Editor 小部件。https://alloyeditor.com/
1.0.1
2024-09-30 12:18 UTC
Requires
- bower-asset/alloyeditor: ^1.0.1,<=1.5.25
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-09-30 12:25:46 UTC
README
Yii2 Alloy Editor
=================
Yii2 Alloy Editor 小部件。 https://alloyeditor.com/
安装
安装此扩展的首选方式是通过 composer。
运行以下命令:
php composer.phar require --prefer-dist srnden/yii2-alloy-editor "~1.0.0"
或者将以下内容添加到您的 composer.json
文件的 require 部分:
"srnden/yii2-alloy-editor": "~1.0.0"
使用方法
扩展安装完成后,只需在您的代码中通过以下方式使用它:
<?php use yii\helpers\Url; use srnden\alloyeditor\AlloyEditor; ?> <?php AlloyEditor::begin([ 'language' => 'ru', 'saveAction' => Url::to(['site/alloy-test'], true), // required 'imageSaveType' => AlloyEditor::IMAGE_SAVE_TYPE_UPLOAD, //'imageSaveAction' => // You save image action. If not set, the module action is used. ]); ?> <h2>Heading</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p> <?php AlloyEditor::end(); ?>