本文整理匯總了PHP中mihaildev\ckeditor\CKEditor類的典型用法代碼示例。如果您正苦於以下問題:PHP CKEditor類的具體用法?PHP CKEditor怎麽用?PHP CKEditor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了CKEditor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
// $form->field($model, 'informasi')->widget(TinyMce::className(), [
// 'options' => ['rows' => 15],
// 'clientOptions' => [
// 'content_style'=>'p {font-size:15px;}',
// 'plugins' => [
// "advlist autolink lists link charmap print preview anchor",
// "searchreplace visualblocks code fullscreen",
// "insertdatetime media table contextmenu paste"
// ],
// 'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
// ]
// ]);
?>
<?php
echo $form->field($model, 'informasi')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => 'some/sub/path'], ['preset' => Yii::$app->devicedetect->isMobile() ? 'basic' : 'full', 'skin' => 'office2013'])]);
?>
<?php
echo $form->field($model, 'status')->dropDownList(DataKerja::status(), ['maxlength' => true]);
?>
<?php
//= $form->field($model, 'created_at')->textInput()
?>
<?php
//= $form->field($model, 'modified_at')->textInput()
?>
示例2:
?>
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'slug')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'image')->widget(InputFile::className(), ['language' => 'en', 'controller' => 'elfinder', 'path' => 'image', 'filter' => 'image', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-success'], 'multiple' => false]);
?>
<?php
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => elFinder::ckeditorOptions(['elfinder'], ['preset' => 'standard', 'entities' => false])]);
?>
<?php
echo $form->field($model, 'meta_title')->textInput();
?>
<?php
echo $form->field($model, 'meta_keywords')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'meta_description')->textInput(['maxlength' => true]);
?>
<?php
示例3:
/* @var $this yii\web\View */
/* @var $model app\modules\appointment\models\Locality */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="locality-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'contact')->widget(\mihaildev\ckeditor\CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions('elfinder')]);
?>
<div class="form-group">
<?php
echo Html::submitButton('Сохранить', ['class' => 'btn btn-success']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例4: implode
use kartik\select2\Select2;
/* @var $this yii\web\View */
/* @var $model yincart\item\models\Item */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="item-form">
<?php
$form = ActiveForm::begin();
$fieldGroups = [];
$fields = [];
$fields[] = $form->field($model, 'sku')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'name')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'description')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['elfinder/manager'])]]);
$fields[] = $form->field($model, 'short_description')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['elfinder/manager'])]]);
$fields[] = $form->field($model, 'meta_description')->textarea(['rows' => 6]);
$fields[] = $form->field($model, 'meta_keywords')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'sort')->textInput();
$fields[] = $form->field($model, 'status')->checkbox();
$fieldGroups[] = ['label' => 'Base Info', 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'original_price')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'price')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'stock_qty')->textInput();
$fields[] = $form->field($model, 'min_sale_qty')->textInput();
$fields[] = $form->field($model, 'max_sale_qty')->textInput();
$fields[] = $form->field($model, 'weight')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'shipping_fee')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'is_free_shipping')->checkbox();
$fieldGroups[] = ['label' => 'Price & Stock', 'content' => implode('', $fields)];
示例5:
<?php
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
?>
<p style="margin-top: -10px;" class="help-block"><?php
echo Yii::t('infoweb/email', 'Tags');
?>
: <?php
echo $template->supported_tags;
?>
</p>
<?php
}
?>
<?php
echo $form->field($model, "[{$model->language}]message")->widget(CKEditor::className(), ['name' => "TemplateLang[{$model->language}][message]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('email')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => $allowContentDuplication ? 'true' : 'false']]);
?>
<?php
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
?>
<p style="margin-top: -10px;" class="help-block"><?php
echo Yii::t('infoweb/email', 'Tags');
?>
: <?php
echo $template->supported_tags;
?>
</p>
<?php
}
?>
</div>
示例6:
<?php
use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
?>
<div class="tab-content downloads-tab">
<?php
echo $form->field($model, 'downloads')->widget(CKEditor::className(), ['editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), ['height' => 200])]);
?>
</div>
示例7: implode
<div class="item-form">
<?php
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
$fieldGroups = [];
$fields = [];
$fields[] = $form->field($model, 'title')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'price')->textInput(['maxlength' => 255]);
$currency = Currency::find()->all();
$fields[] = $form->field($model, 'currency')->dropDownList(ArrayHelper::map($currency, 'currency_id', 'name'));
$language = Language::find()->all();
$fields[] = $form->field($model, 'language')->dropDownList(ArrayHelper::map($language, 'language_id', 'name'));
$fieldGroups[] = ['label' => Yii::t('catalog', 'Base Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'desc')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['/elfinder/manager', 'filter' => 'image'])]]);
$fieldGroups[] = ['label' => Yii::t('catalog', 'Detailed Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'shipping_fee')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'is_show')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_promote')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_new')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_hot')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_best')->radioList(['No', 'Yes']);
$fieldGroups[] = ['label' => Yii::t('catalog', 'Other Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'category_id')->dropDownList(Tree::getTreesByName('商品分類'), ['data-url' => Url::to(['/catalog/core/item/item-props']), 'data-item_id' => $model->item_id, 'data-tree_id' => $model->category_id ? $model->category_id : key(Tree::getTreesByName('商品分類'))]);
$fields[] = $this->render('_form_prop', ['model' => $model, 'tree_id' => $model->category_id ? $model->category_id : key(Tree::getTreesByName('商品分類'))]);
$fieldGroups[] = ['label' => Yii::t('catalog', 'Product Info'), 'content' => implode('', $fields)];
$fields = [];
if ($model->isNewRecord) {
示例8:
echo $form->field($model, 'category_id')->widget(Select2::classname(), ['data' => \yii\helpers\ArrayHelper::map(\common\models\Categories::find()->all(), 'id', 'name'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
echo $form->field($model, 'kitchensIds')->widget(Select2::classname(), ['data' => $model->getdropKitchens(), 'options' => ['placeholder' => 'Select a Kitchens ...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]])->label('Kitchens');
?>
<?php
echo $form->field($model, 'servicesIds')->widget(Select2::classname(), ['data' => $model->getdropServices(), 'options' => ['placeholder' => 'Select a Services ...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]])->label('Services');
?>
<?php
echo $form->field($model, 'metrosIds')->widget(Select2::classname(), ['data' => $model->getdropMetros(), 'options' => ['placeholder' => 'Select a Metros ...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]])->label('Metros');
?>
<?php
echo $form->field($model, 'description')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'basic', 'inline' => false]]);
?>
<?php
echo $form->field($model, 'status')->checkbox(['value' => '0', 'label' => 'Active', 'uncheck' => '1']);
?>
<?php
echo $form->field($model, 'price_from')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'price_to')->textInput(['maxlength' => true]);
?>
示例9:
<?php
use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
use infoweb\cms\helpers\LanguageHelper;
?>
<div class="tab-content default-language-tab">
<?php
echo $form->field($model, "[{$model->language}]name")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][name]", 'data-duplicateable' => Yii::$app->getModule('gallery')->allowContentDuplication ? 'true' : 'false']);
?>
<?php
if (Yii::$app->getModule('gallery')->enableDescription) {
?>
<?php
echo $form->field($model, "[{$model->language}]description")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][description]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => Yii::$app->getModule('gallery')->allowContentDuplication ? 'true' : 'false']]);
?>
<?php
}
?>
</div>
示例10:
<a data-toggle='modal' data-target='#myModal' href='#'>Обзор</a> |
<a class = 'del_img_pages' href = '#'>Удалить</a>
</div>
<?php
echo $form->field($model, 'images')->textInput(['maxlength' => true])->hiddenInput()->label(false);
?>
<div class="cleared"></div>
<br>
<?/*= $form->field($model, 'count_product')->textInput() */?><!--
--><?/*= $form->field($model, 'hint')->textInput(['maxlength' => true]) */?>
<?php
echo $form->field($model, 'fix_menu')->dropDownList(['0' => 'Не прикреплять', '1' => 'Меню 1-го уровня', '2' => 'Меню 2-го уровня']);
?>
<?php
echo $form->field($model, 'description')->widget(CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions('elfinder', ['preset' => 'standard', 'inline' => false])]);
?>
</div>
<div id="panel2" class="tab-pane fade <?php
echo $tabContent2;
?>
">
<h3>Вид</h3>
<?php
echo $form->field($model, 'blokc_id')->dropDownList($block);
?>
<?php
echo Html::button('Добавить блок', ['class' => 'btn btn-success', 'id' => 'addCustBlock']);
?>
<br>
<hr>
示例11:
<div class="cms-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'key')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'name')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['elfinder/manager'])]]);
?>
<?php
echo $form->field($model, 'type')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'author')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'status')->textInput();
?>
示例12:
?>
<div class="page-form">
<?php
$form = ActiveForm::begin();
?>
<div class="row">
<div class="col-md-8">
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'html')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'standard', 'inline' => false]])->label('Content');
?>
</div>
<div class="col-md-4">
<div class="box">
<div class="box-header with-border">
<div class="box-title">Publish</div>
</div>
<div class="box-body">
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? Yii::t('halo/page', 'Create') : Yii::t('halo/page', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
示例13:
?>
<?php
echo $form->errorSummary($model);
?>
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'short_text')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder-backend', ['preset' => 'basic'])]);
?>
<?php
echo $form->field($model, 'text')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder-backend')]);
?>
<?php
echo $form->field($model, 'slug')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'status')->dropDownList(Post::getStatuses());
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? Yii::t('blog', 'Create') : Yii::t('blog', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
示例14:
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use mihaildev\ckeditor\CKEditor;
?>
<div class="feedback-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'item_id')->hiddenInput(['value' => $_GET['id']]);
?>
<?php
echo $form->field($model, 'comment')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'standard', 'inline' => false, 'height' => '100px']]);
?>
<?php
echo $form->field($model, 'rate')->dropDownList(['5' => 'Отлично', '4' => 'Хорошо', '3' => 'Средне', '2' => 'Слабенько', '1' => 'Плохо'], ['promt' => 'Выставьте оценку']);
?>
<div class="form-group">
<?php
echo Html::submitButton('Готово', ['class' => 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例15:
<div class="col-lg-4"><?php
echo $form->field($model, 'published')->dropDownList($model->publishedList, [$model->published]);
?>
</div>
<div class="col-lg-4"><?php
echo $form->field($model, 'created_by')->dropDownList($model->authorsList, [$model->created_by]);
?>
</div>
</div>
<?php
echo $form->field($model, 'intro')->textarea(['rows' => 6]);
?>
<?php
echo $form->field($model, 'text')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder', ['preset' => 'full', 'inline' => false])]);
?>
<?php
if ($model->image != '') {
?>
<div class="row form-group">
<div class="col-lg-4">
<img src="<?php
echo $model->imageUrl;
?>
" alt="" class="img-responsive img-thumbnail" />
<br>
<?php
echo $form->field($model, 'image')->textInput()->label(false);