<div class="help-block"></div> </div> <div class="form-group field-essay-title"> <label class="control-label" for="essay-title">Title</label> <input type="text" id="essay-title" class="form-control" name="Essay[title]" value="<?php echo $model->title; ?> "> <div class="help-block"></div> </div> <div class="form-group field-essay-body"> <label class="control-label" for="essay-body">Body</label> <?php echo Markdowneditor::widget(['model' => $model, 'attribute' => 'body']); ?> <div class="help-block"></div> </div> <div class="form-group"> <button type="submit" class="btn btn-success">Create</button> </div> </form> </div> </div> </div> </div> </div> <iframe width="100%" height="500" src="http://jsfiddle.net/yyx990803/oe7axeab/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
?> <div class="archives-form" style='width:500px;'> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'title')->textInput(); ?> <?php echo $form->field($model, 'type')->dropDownList($arr); ?> <?php echo Markdowneditor::widget(['model' => $model, 'attribute' => 'content']); ?> <div class="form-group"> <?php echo Html::submitButton('提交', ['class' => 'btn btn-success']); ?> </div> <?php ActiveForm::end(); ?> </div> <script type="text/javascript">
/* @var $model app\modules\poll\models\Question */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="question-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'description')->widget(\ijackua\lepture\Markdowneditor::className(), ['markedOptions' => ['tables' => false, 'breaks' => true]]); ?> <?php if ($model->type == $model::TYPE_CUSTOM) { ?> <div class="form-group"> <?php echo Html::a(Yii::t('modules/poll', 'Add answer'), ['/poll/answer/create'], ['class' => 'btn btn-primary', 'onclick' => ' var e = $(this); $.get(e.prop("href"), function(data){ e.next().append(data); $.colorbox.resize(); }); return false; ']);
use yii\widgets\ActiveForm; use ijackua\lepture\Markdowneditor; use ijackua\lepture\MarkdowneditorAssets; /* @var $this yii\web\View */ /* @var $model common\models\Archives */ /* @var $form yii\widgets\ActiveForm */ MarkdowneditorAssets::register($this); ?> <div class="archives-form"> <?php $form = ActiveForm::begin(); ?> <?php echo Markdowneditor::widget(['model' => $model, 'attribute' => 'username']); ?> <div class="form-group"> <?php echo Html::submitButton('提交', ['class' => 'btn btn-success']); ?> </div> <?php ActiveForm::end(); ?> </div>
/* @var $this yii\web\View */ /* @var $model app\models\Blogs */ /* @var $form ActiveForm */ $this->title = '稻草狗 Markdown 编辑器'; ?> <div class="site-editblog"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'title'); ?> <?php echo Markdowneditor::widget(['name' => 'editor', 'value' => '', 'attribute' => 'full_text', 'markedOptions' => ['tables' => false]]); ?> <div class="col-xs-2"> <select name="typeid" class="form-control form-group-sm"> <?php foreach ($type_id as $key => $value) { ?> <option value="<?php echo $key; ?> "><?php echo $value; ?> </option> <?php }