PHP code example of nterms / yii2-redactor-charts
1. Go to this page and download the library: Download nterms/yii2-redactor-charts library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nterms / yii2-redactor-charts example snippets
yii\imperavi\Widget::widget([
'options' => [
'lang' => 'ru',
],
'plugins' => [
'charts',
]
]);
'assetManager' => [
'bundles' => [
'nterms\redactor\charts\ChartsRedactorPluginAsset' => [
'depends' => [
'yii\imperavi\ImperaviRedactorAsset',
'nterms\redactor\charts\ChartjsAsset',
],
],
],
],
<?= \yii\redactor\widgets\Redactor::widget([
'model' => $model,
'attribute' => 'body',
'plugins' => ['charts'],
])
'assetManager' => [
'bundles' => [
'nterms\redactor\charts\ChartsRedactorPluginAsset' => [
'depends' => [
'yii\redactor\widgets\RedactorAsset',
'nterms\redactor\charts\ChartjsAsset',
],
],
],
],
echo \vova07\imperavi\Widget::widget([
'selector' => '#my-textarea-id',
'settings' => [
'lang' => 'ru',
'minHeight' => 200,
'plugins' => [
'charts',
]
]
]);
'assetManager' => [
'bundles' => [
'nterms\redactor\charts\ChartsRedactorPluginAsset' => [
'depends' => [
'vova07\imperavi\Asset',
'nterms\redactor\charts\ChartjsAsset',
],
],
],
],
php composer.phar