yii2-epiceditor-widget

Yii2 widget for EpicEditor - An Embeddable JavaScript Markdown Editor
2 followers

Yii2 widget for EpicEditor - An Embeddable JavaScript Markdown Editor

Links

Demo

on http://epiceditor.com

Installation via Composer

add to require section of your composer.json "ijackua/yii2-epiceditor-widget": "dev-master" and run composer update

Usage example

Active widget

use ijackua\epiceditor\Epiceditor;
 
Epiceditor::widget([
        'model' => $model,
        'attribute' => 'text',
        'options' => ['focusOnLoad' => true],
        'divHtmlOptions' => ['class' => 'epiceditordiv']
    ])

Simple widget

use ijackua\epiceditor\Epiceditor;
 
Epiceditor::widget([
        'name' => 'epiceditor',
        'value' => '# Hello world',
        'options' => ['focusOnLoad' => true],
        'divHtmlOptions' => ['class' => 'epiceditordiv']
    ])

Available EpicEditor options

see on official EpicEditor site

Available Marked options (markdown parser used by EpicEditor)

see on official Marked site

Total 2 comments

#17268 report it
iJackUA at 2014/05/18 03:30pm
It has nothing to do with yiisoft repo or a yiisoft namespace.

Maybe you are missing some point with Composer or Namespaces. Be sure to have in composer.json

"require": {
              ....
        "ijackua/yii2-sharelinks-widget": "dev-master",
              ....
    },

then run composer update and make sure you have a folder after that <PROJECT_ROOT>/vendor/ijackua/yii2-sharelinks-widget.

Then you can use it in View file like this

...
    <div class="col-md-4">
        <?= \ijackua\sharelinks\ShareLinks::widget() ?>
    </div>
...

OR add at the very to of the View file add

<?php
use ijackua\sharelinks\ShareLinks;

and after that you can omit full namespace declaration in code above as at the very beginning you have specified what exactly namespace for this class to use

...
    <div class="col-md-4">
        <?= ShareLinks::widget() ?>
    </div>
...
#17266 report it
nirmalroka at 2014/05/18 11:56am
How to integrate on Yiisoft repo

I am using yiisoft so how should I put this widget on that part, I tried it gives error and I have to again update it with yiisoft repo

Leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet