Download the PHP package udokmeci/yii2-kont-trevor without Composer
On this page you can find all versions of the php package udokmeci/yii2-kont-trevor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download udokmeci/yii2-kont-trevor
More information about udokmeci/yii2-kont-trevor
Files in udokmeci/yii2-kont-trevor
Package yii2-kont-trevor
Short Description Yii2 Sir Trevor + Mustache Custom Block Generator
License MIT
Homepage https://github.com/udokmeci/yii2-kont-trevor
Informations about the package yii2-kont-trevor
yii2-kont-trevor
yii2 optimized content builder upon Sir Trevor wysiwyg custom components with Mustache, jQuery Cropper and others.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuration
Once the extension is installed, simply use it in your code by :
Form
On editor depends on perminder-klair/yii2-sir-trevor-js however you can add you custom blocks. Also register CustomSirTrevorAsset
to view.
Rendering
Rendering basically depends on mustache.php
same template from blocks will be used however creating other blocks are possible. TODO: Block Interface
Block Templating
On base-blocks.php there are defined templates for example Imagetop
title
Anything to write on adding menu.
type
type to pass sir-trevor. Did not checked why but ucfirst non spaced type can be found only.
image
Any image to show on adding menu. If image is not added it tries its best to generate images from html markup but sucks now.
templateObject
Dummy data to work as placeholder on added block.
template
A Mustache template rendered on JS or PHP. So one template is used to pass to editor and on render. The new block will render automatically.
data-st-part="data"
*Required to proccessed by plugin.
data-role="editable-subblock"
Works as text holder. On h* tags it pastes only text content. On other block clears formatting and keeps bold and italic only. Appends HTML on pastes.
data-role="editable-image"
Makes image placeholder and puts controllers above it. You can select upload image, crop it and replace by front end.
image data
src, width, height, id is recorded. if image has id when uploading it sends the old id, if you like to replace image.
data-max-width="1076"
Before uploading reduces if the witdh of image is higher than that width in pixel units. Global setting is 1200px
Images can be combined with other editable-subblock data for alt and title attributes for SEO purposes.
The Current Situation?
There are too many dependencies since I have not find any time to make them combined. It may be used in admin panels only for now but you can serve this one to logged in users as well. You can change classes to fit any other framework.
All versions of yii2-kont-trevor with dependencies
yiisoft/yii2 Version *
perminder-klair/yii2-sir-trevor-js Version 0.0.5
apollo/yii2-i18next Version *
bower-asset/sir-trevor-js Version *
xfg/yii2-mustache.js Version *
cedx/yii2-mustache Version *
madand/yii2-underscore Version *
vova07/yii2-imperavi-widget Version @stable
bower-asset/font-awesome Version ^4.0