Hi All,
It has been a while since I encountered YII. But since a month I started to actively code in the platform. What a relief compared to other frameworks.
Anyway I wanted to store code in my database and edit it online in the browser with syntax highlighting but could not find a plugin for it.
So the codemirror plugin is my first contribution to the community.
I got my inspiration from the EWYMeditor plugin, so credits to this contributor as well!
This is version 0.1 so I encourage people to help me make it better!
My time is limited so i need all the help I can get.
Installation:
Extract to extensions dir
Usage:
create textarea
<?php $this->widget( ‘ext.codemirror.Codemirror’, array(‘model’ => $model,‘attribute’ => ‘myfieldName’, )); ?>
define a target of your own (not yet tested)
<?php $this->widget( ‘ext.codemirror.Codemirror’, array( ‘target’ => ‘textarea’,)); ?>
Please feel free to help me out or drop comments.
2382