- Links
- Demo
- Installation via Composer
- Usage example
- Available EpicEditor options
- Available Marked options (markdown parser used by EpicEditor)
Yii2 widget for EpicEditor - An Embeddable JavaScript Markdown Editor
Links ¶
Demo ¶
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
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
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> ...
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.