ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์Programmingมีวิธีซ่อน toolbar ของ CKEDITOR ไหมครับ แต่ให้มันยังใช้งานได้
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: มีวิธีซ่อน toolbar ของ CKEDITOR ไหมครับ แต่ให้มันยังใช้งานได้  (อ่าน 779 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
Fallen
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 162
ออฟไลน์ ออฟไลน์

กระทู้: 2,751



ดูรายละเอียด เว็บไซต์
« เมื่อ: 07 สิงหาคม 2017, 10:22:38 »

<script>
CKEDITOR.replace( 'editor1', {
            toolbar :
        [
            ['Table','Styles'],
        ],
} );
</script>

มันยังเหลืออยู่หน่อยนึง ถ้าลบหมด มันก็จะใช้ html ไม่ได้
มีวิธีซ่อน Tool ไหมคับ แต่ให้มันยังใช้ได้

 wanwan017
บันทึกการเข้า

chaynuwong
คนรักเสียว
*

พลังน้ำใจ: 10
ออฟไลน์ ออฟไลน์

กระทู้: 149



ดูรายละเอียด เว็บไซต์
« ตอบ #1 เมื่อ: 08 สิงหาคม 2017, 20:15:53 »


You can edit the config.js file in the directory where you put the source files to specify custom toolbars.
โค๊ด:
CKEDITOR.editorConfig = function( config )
{
   config.toolbar = 'Custom'; //makes all editors use this toolbar
   config.toolbar_Custom = []; //define an empty array or whatever buttons you want.
};
ลองดูน่ะครับ
เครดิตจากนี้ครับ https://stackoverflow.com/ques...s/8344567/ckeditor-no-toolbars
บันทึกการเข้า

Fallen
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 162
ออฟไลน์ ออฟไลน์

กระทู้: 2,751



ดูรายละเอียด เว็บไซต์
« ตอบ #2 เมื่อ: 09 สิงหาคม 2017, 16:49:48 »


You can edit the config.js file in the directory where you put the source files to specify custom toolbars.
โค๊ด:
CKEDITOR.editorConfig = function( config )
{
   config.toolbar = 'Custom'; //makes all editors use this toolbar
   config.toolbar_Custom = []; //define an empty array or whatever buttons you want.
};
ลองดูน่ะครับ
เครดิตจากนี้ครับ https://stackoverflow.com/ques...s/8344567/ckeditor-no-toolbars


เอาไปใส่ในนี้ยังไงเหรอครับ

โค๊ด:
<script>

CKEDITOR.replace( 'editor1', {
    on: {
       instanceReady: function() {
           // this is current editor instance
           this.insertHtml( '<?php=$content1;?>' );
       }
    }
} );
</script>

 Tongue
บันทึกการเข้า

หน้า: [1]   ขึ้นบน
พิมพ์