2017 © Pedro Peláez
 

yii2-extension yii2-mkeditor

CKEditor and KCFinder

image

firdows/yii2-mkeditor

CKEditor and KCFinder

  • Monday, November 28, 2016
  • by madone
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 18 % Grown

The README.md

yii2-mkeditor

CKEditor and KCFinder, (*1)

Mkeditor

CKEditor and KCFinder, (*2)

Installation

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

Either run, (*4)

composer require firdows/yii2-mkeditor "*"

or add, (*5)

"firdows/yii2-mkeditor": "*"

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(
  \firdows\mkeditor\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); ?>

Example
, (*9)

Usage with On Change

registerJs(" 
    var content = '';
    CKEDITOR.on('instanceCreated', function (e) {
    content = e.editor.getData();
      e.editor.on('change', function (ev) {
        content = ev.editor.getData();
      });
    });

"); ?>

field($model, 'detail')->widget(
  \firdows\mkeditor\CKEditor::className(), 
  [
    'uploadDir' => '/var/www/public_html/UserFiles',
    'uploadURL' => '/UserFiles/',
    'filemanager'=>true, //true = enabled kcfinder, false = disabled kcfinder
    'preset'=>'full', //toolbar -> basic, standard, full
    'onChange' => true
  ]
)->label(false); ?>

Example
, (*10)

Credit

Jehdu Ahmad, (*11)

The Versions

28/11 2016

dev-master

9999999-dev

CKEditor and KCFinder

  Sources   Download

GPL-3.0

The Requires

 

by Ahamad Jehdu

extension yii2

30/04 2016

0.1.0

0.1.0.0

CKEditor and KCFinder

  Sources   Download

GPL-3.0

The Requires

 

by Ahamad Jehdu

extension yii2