Download the PHP package bajzany/text-editor without Composer
On this page you can find all versions of the php package bajzany/text-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bajzany/text-editor
More information about bajzany/text-editor
Files in bajzany/text-editor
Package text-editor
Short Description Text editor for Nette Framework
License
Homepage https://github.com/bajzany/TextEditor
Informations about the package text-editor
Text Editor
How to install
-
First you must download ckeditor4
-
Now you can add this line in your header html tag
<script src="{$publicPath}/ckeditor/ckeditor.js"></script>
-
Open text-editor/Config/config.neon.dist in vendor dir and paste in into your config directory
-
Register TextEditorFactory in Presenter or Control
/** * @var TextEditorFactory @inject */ public $textEditorFactory;
-
TextEditor can be used so in form control
$formField = $this->textEditorFactory->createFormCkField('TextBlockFactory.content');
$form->addComponent($formField, 'content');
- For creating new type of editor, please create this example Class ``
-
Now important is const BLOCK_NAME this name must be set into js className
In this config first be call configure(), and last one bind(). editorType: 'classic or inline'
`
Load js file with npm @nettpack/core package.
Process:
-
For including this json file must be use this config in composer.json `
- main.js file... Path to your config.
`
- Now you can insert it to webpack build in /app/ModuleName/Assets/app.js
`
In .latte call this new type like this, first parameter is name of type, and last parameter array for function loadData(array $args = []) and function saveContent(string $content, array $args = [])
{control ckEditor, Bundles\TextBlock\Model\CkEditorClassic::BLOCK_NAME, ['name' => $textBlock->getName()]}
All versions of text-editor with dependencies
nette/di Version ^2.4
nette/application Version ^2.4
nette/bootstrap Version ^2.4
latte/latte Version ^2.4
nette/utils Version ^2.4
nettpack/stage Version ^1.0