snake-aas / nckeditor
Implementation of CKEditor WYSIWYG editor as a Nette Framework component
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/snake-aas/nckeditor
Requires
- php: >= 5.3.13
- nette/nette: >= 2.0.10
This package is not auto-updated.
Last update: 2022-02-01 12:27:36 UTC
README
Implementation of CKEditor WYSIWYG editor as a Nette Framework component
Installation
Best way to install is using Composer:
$ composer require snakeaas/nckeditor
Usage
Component itself behave like a default \Nette\Application\UI\Form form, but provides some aditional methods.
Most important is method addRichText for adding CKEditor.
Example:
protected function createComponentEditor() { $editor = new \snakeaas\NCKEditor\NCKEditor(__DIR__ . '/../../www'); $editor->addText('title', 'Nadpis'); $editor->addRichText('editor', 'Text'); $editor->addSubmit('save', 'Save'); $editor->onSuccess[] = function (\Nette\Application\UI\Form $form) { // ... process values }; return $editor; }