การทำ yii2 textarea editor ด้วย Yii 2.0: yii2-tinymce

ผมได้มีโอกาสมาเรียน Yii2 ห้าวันถือว่าเป็นสิ่งดีมากๆ สำหรับการพัฒนา วันนี้เลยลองการทำ yii2 textarea editor ด้วย Yii 2.0: yii2-tinymce code สั้นๆ จริงๆ  อยากได้อะไรก็ Composer เอาครับ
ติดตั้งโดยเพิ่มลงไปใน composer.json
"moonlandsoft/yii2-tinymce": "*"
to the require section of your composer.json file.
แล้วใช้งานแบบนี้เลย
<?php use moonland\tinymce\TinyMCE;   echo TinyMCE::widget(['name' =&gt; 'text-content']);
 
$form-&gt;field($model, 'attribute')-&gt;widget(TinyMCE::className());
 
//toggle to tinyMCE or to textarea
 
echo TinyMCE::widget(['name' =&gt; 'text-content', 'toggle' =&gt; ['active' =&gt; true]]);
 
$form-&gt;field($model, 'attribute')-&gt;widget(TinyMCE::className(), [
    'toggle' =&gt; [
        'active' =&gt; true,
    ]
]);
การทำ yii2 textarea editor ด้วย Yii 2.0: yii2-tinymce การทำ yii2 textarea editor ด้วย Yii 2.0: yii2-tinymce Reviewed by IOffer on กรกฎาคม 15, 2560 Rating: 5

ไม่มีความคิดเห็น:

แจก Function หาขนาดไฟล์ในโฟลเดอร์ PHP

แจก Function หาขนาดไฟล์ในโฟลเดอร์ PHP  function format_folder_size($size) {  if ($size >= 1073741824)  {   $size = number_format($size / ...

ขับเคลื่อนโดย Blogger.