2017 © Pedro Peláez
 

yii2-extension yii2-keditor

CKEditor and KCFinder

image

kuakling/yii2-keditor

CKEditor and KCFinder

  • Monday, April 18, 2016
  • by kuakling
  • Repository
  • 1 Watchers
  • 1 Stars
  • 48 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-keditor

CKEditor and KCFinder, (*1)

Keditor

CKEditor and KCFinder, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

composer require kuakling/yii2-keditor "*"

or add, (*5)

"kuakling/yii2-keditor": "*"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by :, (*7)

Convert textarea to CKEditor, (*8)

<?php
//CKEditor
echo $form->field($model, 'detail')->widget(
  \kuakling\keditor\CKEditor::className(), 
  [
    'uploadDir' => '/var/www/public_html/UserFiles',
    'uploadURL' => '/UserFiles/',
    'filemanager'=>true, //true = enabled kcfinder, false = disabled kcfinder
    'preset'=>'full' //toolbar -> basic, standard, full
  ]
)->label(false); ?>
<?php
//TinyMce
echo $form->field($model, 'detail')->widget(
  \kuakling\keditor\TinyMce::className(), 
  [
    'uploadDir' => '/var/www/public_html/UserFiles',
    'uploadURL' => '/UserFiles/',
    'enableFilemanager' => true,
    'folderName' => ['file'=> 'File', 'image'=>'Image', 'media'=>'Media'],
  ]
); ?>

Using textinput choose file in server and return filename to textinput by CKFinder, (*9)

<?php 
echo $form->field($model, 'icon')->widget(
  \kuakling\keditor\KCFinderTextInput::className(),
  [
    'dir' => 'icons' //sub directory of kcfinder upload directory
  ]
)->label(false);
?>

The Versions

18/04 2016

dev-master

9999999-dev

CKEditor and KCFinder

  Sources   Download

GPL-3.0

The Requires

 

by Surakit Choodet

extension yii2