當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CKEditor::className方法代碼示例

本文整理匯總了PHP中mihaildev\ckeditor\CKEditor::className方法的典型用法代碼示例。如果您正苦於以下問題:PHP CKEditor::className方法的具體用法?PHP CKEditor::className怎麽用?PHP CKEditor::className使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mihaildev\ckeditor\CKEditor的用法示例。


在下文中一共展示了CKEditor::className方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'topic_image')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => '/images/content/', 'preset' => 'basic', 'inline' => false], 'editorOptions' => ElFinder::ckeditorOptions('elfinder', [])]);
?>
 

    <?php 
echo $form->field($model, 'title_content')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => '/images/content/', 'preset' => 'full', 'inline' => false], 'editorOptions' => ElFinder::ckeditorOptions('elfinder', [])]);
?>
 

    <?php 
echo $form->field($model, 'data')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => '/images/content/', 'preset' => 'full', 'inline' => false], 'editorOptions' => ElFinder::ckeditorOptions('elfinder', [])]);
?>
 
    
    <?php 
echo $form->field($model, 'category_id')->dropDownList([1 => 'Games', 2 => 'Movies', 3 => 'Music']);
?>

    <?php 
echo $form->field($model, 'PUBLISHED')->dropDownList([1 => 'Publish', 0 => 'No Publish']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
開發者ID:Ramengel,項目名稱:yii_fl,代碼行數:31,代碼來源:_form.php

示例2:

?>

    <?php 
echo $form->field($model, 'name')->textInput(['value' => $tour->name]);
?>
    <?php 
echo $form->field($model, 'org')->textInput(['value' => $tour->org]);
?>
    <?php 
echo $form->field($model, 'tel')->textInput(['value' => $tour->tel]);
?>
    <?php 
echo $form->field($model, 'address')->textInput(['value' => $tour->address]);
?>
    <?php 
echo $form->field($model, 'info')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'full', 'inline' => false]])->textInput(['value' => $tour->info]);
//$form->field($model, 'info')
?>

    <?php 
echo $form->field($model, 'site')->textInput(['value' => $tour->site]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Обновить', ['class' => 'btn btn-primary']);
?>
    </div>
    <?php 
ActiveForm::end();
?>
開發者ID:zlapot,項目名稱:sitev2,代碼行數:31,代碼來源:update.php

示例3:

?>

    <?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 
開發者ID:nguyentuansieu,項目名稱:OneCMS,代碼行數:31,代碼來源:_form.php

示例4:

<?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>
開發者ID:infoweb-internet-solutions,項目名稱:yii2-skarabee,代碼行數:10,代碼來源:_downloads_tab.php

示例5:

/* @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>
開發者ID:andreyvaslv,項目名稱:crb,代碼行數:30,代碼來源:_form.php

示例6:

<?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>
    
開發者ID:aversilov,項目名稱:singree-bboard,代碼行數:29,代碼來源:_form.php

示例7:

    <?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>
開發者ID:infoweb-internet-solutions,項目名稱:yii2-cms-email,代碼行數:31,代碼來源:_default_language_tab.php

示例8:

<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();
?>

開發者ID:yinheark,項目名稱:yincart2,代碼行數:29,代碼來源:_form.php

示例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>
開發者ID:infoweb-internet-solutions,項目名稱:yii2-image-gallery,代碼行數:21,代碼來源:_default_language_tab.php

示例10:

?>

    <?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>
開發者ID:NullRefExcep,項目名稱:yii2-blog,代碼行數:31,代碼來源:_form.php

示例11:

?>

<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>
開發者ID:chabberwock,項目名稱:halo-dev,代碼行數:31,代碼來源:_form.php

示例12:

// $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()
?>
開發者ID:aldife,項目名稱:yii2-work-schedule,代碼行數:31,代碼來源:_form.php

示例13:

<?php

use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
use infoweb\cms\helpers\LanguageHelper;
?>
<div class="tab-content language-tab">

    <?php 
echo $form->field($model, "[{$model->language}]title")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][title]", 'data-duplicateable' => var_export($allowContentDuplication, true)]);
?>

    <?php 
if (Yii::$app->getModule('partials')->enableUrl) {
    ?>
    <?php 
    echo $form->field($model, "[{$model->language}]url")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][url]", 'data-duplicateable' => var_export($allowContentDuplication, true)]);
    ?>
    <?php 
}
?>

    <?php 
echo $form->field($model, "[{$model->language}]content")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][content]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('partials')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => var_export($allowContentDuplication, true)]]);
?>
</div>
開發者ID:infoweb-internet-solutions,項目名稱:yii2-cms-partials,代碼行數:26,代碼來源:_default_language_tab.php

示例14:

?>

            <?php 
echo $form->field($model, 'type')->dropDownList($pageTypesMap);
?>
        </div>

        <div id="editor-wrapper" class="col-md-9">

            <div class="row" data-type="<?php 
echo Page::TYPE_CONTENT;
?>
" style="display: none">
                <div class="col-md-12">
                    <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder-backend', ['height' => 300])]);
?>
                </div>
            </div>

            <div class="row" data-type="<?php 
echo Page::TYPE_BLOCKS;
?>
" style="display: none">
                <?php 
echo $this->render('_blocks', ['model' => $model]);
?>
            </div>

        </div>
開發者ID:NullRefExcep,項目名稱:yii2-cms,代碼行數:30,代碼來源:_form.php

示例15:

<?php

use mihaildev\ckeditor\CKEditor;
use mihaildev\elfinder\ElFinder;
use yii\web\View;
/**
 * @var $form \yii\widgets\ActiveForm
 * @var $block \nullref\cms\blocks\html\Block
 * @var $this \yii\web\View
 */
list(, $footnotesUrl) = Yii::$app->assetManager->publish('@nullref/cms/assets/ckeditor-plugins/codemirror');
$this->registerJs("CKEDITOR.plugins.addExternal( 'codemirror', '" . $footnotesUrl . "/','plugin.js');\nObject.keys(CKEDITOR.dtd.\$removeEmpty).forEach(function(key){CKEDITOR.dtd.\$removeEmpty[key] = 0;});\n", View::POS_END);
$editorConfig = ['id' => 'editor', 'editorOptions' => ['preset' => 'full', 'inline' => false, 'extraPlugins' => 'codemirror', 'allowedContent' => true, 'basicEntities' => false, 'entities' => false, 'entities_greek' => false, 'entities_latin' => false, 'htmlEncodeOutput' => false, 'entities_processNumerical' => false, 'fillEmptyBlocks' => false, 'fullPage' => false, 'codemirror' => ['autoCloseBrackets' => true, 'autoCloseTags' => true, 'autoFormatOnStart' => true, 'autoFormatOnUncomment' => true, 'continueComments' => true, 'enableCodeFolding' => true, 'enableCodeFormatting' => true, 'enableSearchTools' => true, 'highlightMatches' => true, 'indentWithTabs' => false, 'lineNumbers' => true, 'lineWrapping' => true, 'mode' => 'htmlmixed', 'matchBrackets' => true, 'matchTags' => true, 'showAutoCompleteButton' => true, 'showCommentButton' => true, 'showFormatButton' => true, 'showSearchButton' => true, 'showTrailingSpace' => true, 'showUncommentButton' => true, 'styleActiveLine' => true, 'theme' => 'default', 'useBeautify' => true]]];
$editorConfig['editorOptions'] = ElFinder::ckeditorOptions('elfinder-backend', $editorConfig['editorOptions']);
echo $form->field($block, 'content')->widget(CKEditor::className(), $editorConfig);
echo $form->field($block, 'tag')->textInput();
echo $form->field($block, 'tagClass')->textInput();
開發者ID:NullRefExcep,項目名稱:yii2-cms,代碼行數:17,代碼來源:_form.php


注:本文中的mihaildev\ckeditor\CKEditor::className方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。