สิ่งที่ทำให้ CkEditor เพิ่มแถบเครื่องมือตรงกลางหน้า

ฉันไม่เข้าใจว่าอะไรทำให้ปลั๊กอิน spaceShared เพิ่มแถบเครื่องมือใหม่ตรงกลางพื้นที่ข้อความ

เมื่อเร็วๆ นี้ ฉันเพิ่มปลั๊กอิน SharedSpaces ลงใน CkEditor ของฉัน และฉันนำโค้ดจากตัวอย่างที่ฉันได้รับจาก SharedSpaces แม้ว่าฉันจะได้แถบเครื่องมืออยู่ระหว่างพื้นที่ข้อความก็ตาม

รหัส HTML ของฉัน:

<div id="topSpace">
    </div>
    <form action="sample_posteddata.php" id="editorsForm" method="post">
        <p>
                    <label for="editor1">
                        Editor 1 (uses the shared toolbar and elements path):</label>
                    <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
        </p>
        <p>
                    <label for="editor2">
                        Editor 2 (uses the shared toolbar and elements path):</label>
                    <textarea cols="80" id="editor2" name="editor2" rows="3">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
        </p>
        <p>
                    <label for="editor3">
                        Editor 3 (uses the shared toolbar only):</label>
                    <textarea cols="80" id="editor3" name="editor3" rows="3">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
        </p>
        <p>
                    <label for="editor4">
                        Editor 4 (no shared spaces):</label>
                    <textarea cols="80" id="editor4" name="editor4" rows="3">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
        </p>
        <p>
                    <input type="submit" value="Submit" />
        </p>
    </form>
    <div id="bottomSpace">
    </div

ส่วนจาวาสคริปต์

<script type="text/javascript">
    //<![CDATA[

        // Create all editor instances at the end of the page, so we are sure
        // that the "bottomSpace" div is available in the DOM (IE issue).

        CKEDITOR.replace( 'editor1',
            {
                sharedSpaces :
                {
                    top : 'topSpace',
                    bottom : 'bottomSpace'
                },

                // Removes the maximize plugin as it's not usable
                // in a shared toolbar.
                // Removes the resizer as it's not usable in a
                // shared elements path.
                removePlugins : 'maximize'
            } );

        CKEDITOR.replace( 'editor2',
            {
                sharedSpaces :
                {
                    top : 'topSpace',
                    bottom : 'bottomSpace'
                },

                // Removes the maximize plugin as it's not usable
                // in a shared toolbar.
                // Removes the resizer as it's not usable in a
                // shared elements path.
                removePlugins : 'maximize'
            } );

        CKEDITOR.replace( 'editor3',
            {
                sharedSpaces :
                {
                    top : 'topSpace',
                    bottom : 'bottomSpace'
                },

                // Removes the maximize plugin as it's not usable
                // in a shared toolbar.
                removePlugins : 'maximize, elementspath',

            } );

        CKEDITOR.replace( 'editor4' );
    //]]>
    </script>

ฉันจะแก้ไขหรือลบแถบเครื่องมือที่ไม่ต้องการที่ปรากฏออกมาได้อย่างไร


person Yellow and Red    schedule 22.06.2013    source แหล่งที่มา


คำตอบ (2)


ฉันเห็นปัญหาสองประการในตัวอย่างนี้ที่คุณแนบมา:

  1. ปลั๊กอินของบุคคลที่สามคุณภาพต่ำบางตัวเกิดข้อผิดพลาดและใช้ console.log (sic!) จากสิ่งที่ฉันเห็นนี่คือตัวแก้ไขซอร์สโค้ดและปลั๊กอินการนับจำนวนคำที่น่าจะเป็นไปได้มากที่สุด ลบออกจากงานสร้างของคุณ

  2. เช่นเดียวกับใน ตัวอย่างพื้นที่สาธารณะ คุณต้องลบออก ปลั๊กอิน floatingspace ซึ่งขัดแย้งกับ sharedspace

หลังจากนี้ทุกอย่างควรจะโอเค

person Reinmar    schedule 22.06.2013
comment
ฉันกำลังสร้าง ckeditor ขึ้นมาใหม่โดยลบปลั๊กอินบางตัวออก ให้ฉันดูว่าจะเกิดอะไรขึ้นต่อไป ขอบคุณไรน์มาร์ - person Yellow and Red; 22.06.2013
comment
ฉันสร้าง Ckeditor ขึ้นมาใหม่โดยใช้ตัวสร้าง ฉันยังดาวน์โหลดทั้งสามเวอร์ชันและติดตั้งในเครื่อง โดยไม่มีปัญหาใดเลยก่อนที่จะติดตั้งปลั๊กอิน spaceshared หลังจากที่ฉันอัปเดตปลั๊กอิน SpaceShared จุดบกพร่องทั้งสองก็ปรากฏขึ้น ฉันไม่พบปลั๊กอิน floatingspace - person Yellow and Red; 22.06.2013
comment
การเพิ่มสิ่งนี้ลงในสคริปต์ช่วยชีวิตฉันไว้ [รหัส] ลบปลั๊กอิน: 'floatingspace, ปรับขนาด', [/ รหัส] - person Yellow and Red; 22.06.2013

คุณกำลังใช้ปลั๊กอินพิเศษบางตัว (เช่น ตัวนับคำและแถบเครื่องมือแบบลอย) และอาจยังไม่ได้รับการพัฒนาเพื่อใช้ในหน้าที่มีบรรณาธิการหลายคนพร้อมกันและในการกำหนดค่าพื้นที่ที่ใช้ร่วมกัน

person AlfonsoML    schedule 22.06.2013
comment
ฉันกำลังสร้าง ckeditor ขึ้นมาใหม่โดยลบปลั๊กอินบางตัวออก ให้ฉันดูว่าจะเกิดอะไรขึ้นต่อไป ขอบคุณอัลฟองโซ.. - person Yellow and Red; 22.06.2013