chuzzlik/yii2-ckeditor5

CKEditor 5 WYSIWYG widget for Yii2

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

Type:yii2-extension

dev-master 2023-04-02 21:18 UTC

This package is auto-updated.

Last update: 2024-05-31 00:22:13 UTC


README

CKEditor 5 WYSIWYG widget for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist chuzzlik/yii2-ckeditor5 "*"

or add

"chuzzlik/yii2-ckeditor5": "*"

to the require section of your composer.json file.

Usage

Examples of using:

use chuzzlik\ckeditor5\EditorClassic;
...
	<?= $form->field($model, 'content')->widget(EditorClassic::className(),[
		'clientOptions' => [
			'language' => 'en',
			'uploadUrl' => 'upload', 	//url for upload files
			'uploadField' => 'image',	//field name in the upload form
		]
	]); ?>
use chuzzlik\ckeditor5\EditorInline;	//..or EditorBalloon
...
	<?php EditorInline::begin([
		'name' => 'editor-inline',
		'clientOptions' => [
			'language' => 'en',
			'uploadUrl' => 'upload'
		]
	]);?>
		<h1>The three greatest things you learn from traveling</h1>
		<p>Like all the great things on earth traveling teaches us by example. 
		Here are some of the most precious lessons I’ve learned over the years of traveling.</p>
	<?php EditorInline::end();?>

Look for detailed documentation and examples on the official website of CKEditor 5 https://ckeditor.com/ckeditor-5/