sulu-standard icon indicating copy to clipboard operation
sulu-standard copied to clipboard

Problem with removing a button from the ckEditor toolbar

Open RaphaelHofer opened this issue 9 years ago • 1 comments

Hey, i tried to remove the format dropdown from the ckEditor toolbar and ended up with some problems:

My XML Template:

<?xml version="1.0" ?>
<template xmlns="http://schemas.sulu.io/template/template"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd">

    <key>startpage</key>

    <view>ClientWebsiteBundle:templates:startpage</view>
    <controller>ClientWebsiteBundle:ClientWebsite:index</controller>
    <cacheLifetime>2400</cacheLifetime>

    <meta>
        <title lang="de">Startpage</title>
        <title lang="en">Startpage</title>
    </meta>

    <properties>
        <property name="title" type="text_line" mandatory="true">
            <meta>
                <title lang="de">Titel</title>
                <title lang="en">Title</title>
            </meta>

            <tag name="sulu.rlp.part"/>
        </property>

        <property name="url" type="resource_locator" mandatory="true">
            <meta>
                <title lang="de">Adresse</title>
                <title lang="en">Resourcelocator</title>
            </meta>

            <tag name="sulu.rlp"/>
        </property>

        <section name="header">
            <meta>
                <title lang="de">Header</title>
                <title lang="en">Header</title>

                <info_text lang="de">Bereich für den Header</info_text>
                <info_text lang="en">Header Section</info_text>
            </meta>
            <properties>
                <block name="header_slide"
                       default-type="slide">
                    <meta>
                        <title lang="de">Header Slide</title>
                        <title lang="en">Header Slide</title>
                    </meta>
                    <types>
                        <type name="slide">
                            <properties>
                                <property name="images" type="media_selection" colspan="3">
                                    <meta>
                                        <title lang="de">Bild</title>
                                        <title lang="en">Image</title>
                                    </meta>
                                    <tag name="sulu.search.field" role="image" index="false"/>
                                    <params>
                                        <param name="types" value="image"/>
                                        <param name="displayOptions" type="collection"/>
                                    </params>
                                </property>
                                <property name="slide_title" type="text_line" colspan="9">
                                    <meta>
                                        <title lang="de">Titel</title>
                                        <title lang="en">Title</title>
                                    </meta>
                                    <tag name="sulu.search.field" type="string"/>
                                    <tag name="sulu.content.sortmode.show"/>
                                </property>
                                <property name="slide_description" type="text_editor" colspan="9">
                                    <meta>
                                        <title lang="de">Text</title>
                                        <title lang="en">Text</title>
                                    </meta>
                                    <params>
                                        <param name="link" value="true"/>
                                        <param name="table" value="true"/>
                                        <param name="extra_allowed_content" value="img(*)[*]; span(*)[*]; div(*)[*]; iframe(*)[*]; script(*)[*]" />
                                        <param name="height" value="130"/>
                                        <param name="max_height" value="500"/>
                                        <param name="paste_from_word" value="true"/>
                                    </params>
                                    <tag name="sulu.search.field" type="string"/>
                                </property>
                                <property name="button_text" type="text_line" colspan="6">
                                    <meta>
                                        <title lang="de">Button Text</title>
                                        <title lang="en">Button text</title>
                                    </meta>
                                </property>
                                <property name="button_url" type="text_line" colspan="6">
                                    <meta>
                                        <title lang="de">Button URL</title>
                                        <title lang="en">Button url</title>
                                    </meta>
                                </property>
                                <property name="dark_text" type="checkbox">
                                    <meta>
                                        <title lang="de">Dunkle Textfarbe</title>
                                        <title lang="en">Dark textcolor</title>
                                    </meta>
                                </property>
                            </properties>
                        </type>
                    </types>
                </block>
            </properties>
        </section>

        <section name="section">
            <meta>
                <title lang="de">Sektion</title>
                <title lang="en">Section</title>

                <info_text lang="de">Bereich für den Inhalt</info_text>
                <info_text lang="en">Content Section</info_text>
            </meta>
            <properties>
                <property name="section_images" type="media_selection" colspan="3">
                    <meta>
                        <title lang="de">Bild</title>
                        <title lang="en">Image</title>
                    </meta>
                    <tag name="sulu.search.field" role="image" index="false"/>
                    <params>
                        <param name="types" value="image"/>
                        <param name="displayOptions" type="collection"/>
                    </params>
                </property>
                <property name="section_title" type="text_line" colspan="9">
                    <meta>
                        <title lang="de">Titel</title>
                        <title lang="en">Title</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="section_description" type="text_editor" colspan="9">
                    <meta>
                        <title lang="de">Text</title>
                        <title lang="en">Text</title>
                    </meta>
                    <params>
                        <param name="link" value="true"/>
                        <param name="table" value="true"/>
                        <param name="extra_allowed_content" value="img(*)[*]; span(*)[*]; div(*)[*]; iframe(*)[*]; script(*)[*]" />
                        <param name="height" value="130"/>
                        <param name="max_height" value="500"/>
                        <param name="paste_from_word" value="true"/>
                        <param name="remove_buttons" value="Format"/>
                    </params>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="section_button_text" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Button Text</title>
                        <title lang="en">Button text</title>
                    </meta>
                </property>
                <property name="section_button_url" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Button URL</title>
                        <title lang="en">Button url</title>
                    </meta>
                </property>
            </properties>
        </section>

        <section name="slideshow">
            <meta>
                <title lang="de">Slideshow</title>
                <title lang="en">Slideshow</title>

                <info_text lang="de">Bereich für die Slideshow</info_text>
                <info_text lang="en">Slideshow Content Section</info_text>
            </meta>
            <properties>
                <block name="content_slide"
                       default-type="content_slide">
                    <meta>
                        <title lang="de">Slideshow</title>
                        <title lang="en">Slideshow</title>
                    </meta>
                    <types>
                        <type name="content_slide">
                            <properties>
                                <property name="images" type="media_selection" colspan="3">
                                    <meta>
                                        <title lang="de">Bild</title>
                                        <title lang="en">Image</title>
                                    </meta>
                                    <tag name="sulu.search.field" role="image" index="false"/>
                                    <params>
                                        <param name="types" value="image"/>
                                        <param name="displayOptions" type="collection"/>
                                    </params>
                                </property>
                                <property name="slide_description" type="text_editor" colspan="9">
                                    <meta>
                                        <title lang="de">Text</title>
                                        <title lang="en">Text</title>
                                    </meta>
                                    <params>
                                        <param name="link" value="true"/>
                                        <param name="table" value="true"/>
                                        <param name="extra_allowed_content" value="img(*)[*]; span(*)[*]; div(*)[*]; iframe(*)[*]; script(*)[*]" />
                                        <param name="height" value="130"/>
                                        <param name="max_height" value="500"/>
                                        <param name="paste_from_word" value="true"/>
                                    </params>
                                    <tag name="sulu.search.field" type="string"/>
                                    <tag name="sulu.content.sortmode.show"/>
                                </property>
                                <property name="slide_note" type="text_line" colspan="9">
                                    <meta>
                                        <title lang="de">Fußnote</title>
                                        <title lang="en">Note</title>
                                    </meta>
                                    <tag name="sulu.search.field" type="string"/>
                                </property>
                                <property name="button_text" type="text_line" colspan="6">
                                    <meta>
                                        <title lang="de">Button Text</title>
                                        <title lang="en">Button text</title>
                                    </meta>
                                </property>
                                <property name="button_url" type="text_line" colspan="6">
                                    <meta>
                                        <title lang="de">Button URL</title>
                                        <title lang="en">Button url</title>
                                    </meta>
                                </property>
                                <property name="slide_dark_text" type="checkbox">
                                    <meta>
                                        <title lang="de">Dunkle Textfarbe</title>
                                        <title lang="en">Dark textcolor</title>
                                    </meta>
                                </property>
                            </properties>
                        </type>
                    </types>
                </block>
            </properties>
        </section>

        <section name="newsoverview">
            <meta>
                <title lang="de">News/Events</title>
                <title lang="en">News/Events</title>

                <info_text lang="de">Bereich für News und Events</info_text>
                <info_text lang="en">Section for News and Events</info_text>
            </meta>
            <properties>
                <property name="news_title" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Titel</title>
                        <title lang="en">Title</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="news_description" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Subtitel</title>
                        <title lang="en">Subtitle</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="smartcontent_block" type="smart_content">
                    <meta>
                        <title lang="de">Detailseiten</title>
                        <title lang="en">Detailpages</title>
                    </meta>

                    <params>
                        <param name="properties" type="collection">
                            <param name="header_image" value="header_image"/>
                            <param name="header_subtitle" value="header_subtitle"/>
                            <param name="header_text" value="header_text"/>
                            <param name="title" value="title"/>
                            <param name="alternative_title" value="alternative_title"/>
                            <param name="ext_title" value="excerpt.title"/>
                            <param name="ext_description" value="excerpt.description"/>
                            <param name="ext_tags" value="excerpt.tags"/>
                            <param name="ext_images" value="excerpt.images"/>
                            <param name="ext_more" value="excerpt.more"/>
                            <param name="ext_categories" value="excerpt.categories"/>
                        </param>
                    </params>
                </property>
                <property name="news_button_text" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Button Text</title>
                        <title lang="en">Button text</title>
                    </meta>
                </property>
                <property name="news_button_url" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Button URL</title>
                        <title lang="en">Button url</title>
                    </meta>
                </property>
            </properties>
        </section>

        <section name="instagram">
            <meta>
                <title lang="de">Instagram</title>
                <title lang="en">Instagram</title>

                <info_text lang="de">Bereich für Instagram</info_text>
                <info_text lang="en">Section for Instagram</info_text>
            </meta>
            <properties>
                <property name="insta_title" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Titel</title>
                        <title lang="en">Title</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="insta_subtitle" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Subtitel</title>
                        <title lang="en">Subtitle</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="insta_button_text" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Button Text</title>
                        <title lang="en">Button text</title>
                    </meta>
                </property>
                <property name="insta_button_url" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Button URL</title>
                        <title lang="en">Button url</title>
                    </meta>
                </property>
            </properties>
        </section>
    </properties>
</template>

I tried to remove the format of the section (name=section) with

      <param name="remove_buttons" value="Format"/>

and ended up with this:

bildschirmfoto 2015-08-06 um 15 20 14

The whole toolbar got disabled. - That problem didn't occur on every template/text_editor block where i removed the format but on the most.

It worked without any problems on this one:


<?xml version="1.0" ?>
<template xmlns="http://schemas.sulu.io/template/template"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd">

    <key>default</key>

    <view>ClientWebsiteBundle:templates:default</view>
    <controller>SuluWebsiteBundle:Default:index</controller>
    <cacheLifetime>2400</cacheLifetime>

    <meta>
        <title lang="de">Standard</title>
        <title lang="en">Default</title>
    </meta>

    <properties>
        <property name="title" type="text_line" mandatory="true">
            <meta>
                <title lang="de">Titel</title>
                <title lang="en">Title</title>
            </meta>

            <tag name="sulu.rlp.part"/>
        </property>
        <property name="alternative_title" type="text_line">
            <meta>
                <title lang="de">Seitentitel</title>
                <title lang="en">Pagetitle</title>
            </meta>
            <tag name="sulu.search.field" type="string"/>
        </property>
        <property name="url" type="resource_locator" mandatory="true">
            <meta>
                <title lang="de">Adresse</title>
                <title lang="en">Resourcelocator</title>
            </meta>

            <tag name="sulu.rlp"/>
        </property>

        <section name="header">
            <meta>
                <title lang="de">Header</title>
                <title lang="en">Header</title>

                <info_text lang="de">Bereich für den Header</info_text>
                <info_text lang="en">Header Section</info_text>
            </meta>
            <properties>
                <property name="header_subtitle" type="text_line">
                    <meta>
                        <title lang="de">Subtitel</title>
                        <title lang="en">Subtitle</title>
                    </meta>
                </property>
                <property name="header_text" type="text_editor">
                    <tag name="sulu.search.field" role="description"/>
                    <meta>
                        <title lang="de">Text</title>
                        <title lang="en">Text</title>
                    </meta>

                    <params>
                        <param name="link" value="true"/>
                        <param name="table" value="true"/>
                        <param name="extra_allowed_content" value="img(*)[*]; span(*)[*]; div(*)[*]; iframe(*)[*]; script(*)[*]" />
                        <param name="height" value="100"/>
                        <param name="max_height" value="500"/>
                        <param name="paste_from_word" value="true"/>
                        <param name="remove_buttons" value="Format" />
                    </params>
                </property>
                <property name="header_image" type="media_selection">
                    <tag name="sulu.search.field" role="image" index="false"/>
                    <meta>
                        <title lang="de">Bild</title>
                        <title lang="en">Image</title>
                    </meta>
                    <params>
                        <param name="types" value="image"/>
                        <param name="displayOptions" type="collection"/>
                    </params>
                </property>
            </properties>
        </section>

        <section name="content">
            <meta>
                <title lang="de">Inhalt</title>
                <title lang="en">Content</title>

                <info_text lang="de">Bereich für den Inhalt</info_text>
                <info_text lang="en">Content Section</info_text>
            </meta>
            <properties>
                <block name="text_block"
                       default-type="textblock">
                    <meta>
                        <title lang="de">Textblock</title>
                        <title lang="en">Text Block</title>
                    </meta>
                    <types>
                        <type name="textblock">
                            <properties>
                                <property name="images" type="media_selection" colspan="3">
                                    <meta>
                                        <title lang="de">Bild</title>
                                        <title lang="en">Image</title>
                                    </meta>
                                    <tag name="sulu.search.field" role="image" index="false"/>
                                    <params>
                                        <param name="types" value="image"/>
                                        <param name="displayOptions" type="collection"/>
                                    </params>
                                </property>
                                <property name="block_title" type="text_line" colspan="9">
                                    <meta>
                                        <title lang="de">Titel</title>
                                        <title lang="en">Title</title>
                                    </meta>
                                    <tag name="sulu.search.field" type="string"/>
                                    <tag name="sulu.content.sortmode.show"/>
                                </property>
                                <property name="block_description" type="text_editor" colspan="9">
                                    <meta>
                                        <title lang="de">Beschreibung</title>
                                        <title lang="en">Description</title>
                                    </meta>
                                    <tag name="sulu.search.field" type="string"/>
                                    <params>
                                        <param name="remove_buttons" value="Format" />
                                    </params>
                                </property>
                            </properties>
                        </type>
                        <type name="map">
                            <properties>
                                <property name="block_title" type="text_line" colspan="12">
                                    <meta>
                                        <title lang="de">Titel</title>
                                        <title lang="en">Title</title>
                                    </meta>
                                    <tag name="sulu.search.field" type="string"/>
                                </property>
                                <property name="block_description" type="text_editor" colspan="12">
                                    <meta>
                                        <title lang="de">Beschreibung</title>
                                        <title lang="en">Description</title>
                                    </meta>
                                    <tag name="sulu.search.field" type="string"/>
                                </property>
                            </properties>
                        </type>
                    </types>
                </block>
            </properties>
        </section>

        <section name="int_links">
            <meta>
                <title lang="de">Links</title>
                <title lang="en">Links</title>

                <info_text lang="de">Bereich für Links</info_text>
                <info_text lang="en">Area for Links</info_text>
            </meta>

            <properties>
                <property name="links_title" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Titel</title>
                        <title lang="en">Title</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="links" type="internal_links">
                    <meta>
                        <title lang="de">Links</title>
                        <title lang="en">Links</title>
                    </meta>
                    <params>
                        <param name="properties" type="collection">
                            <param name="title" value="title"/>
                            <param name="alternative_title" value="alternative_title"/>
                            <param name="header_image" value="header_image"/>
                            <param name="excImages" value="excerpt.images"/>
                            <param name="product_image" value="product_image"/>
                        </param>
                    </params>
                </property>
            </properties>
        </section>

        <section name="downloads">
            <meta>
                <title lang="de">Downloads</title>
                <title lang="en">Downloads</title>

                <info_text lang="de">Bereich für Downloads</info_text>
                <info_text lang="en">Area for Downloads</info_text>
            </meta>
            <properties>
                <property name="downloads_title" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Titel</title>
                        <title lang="en">Title</title>
                    </meta>
                    <tag name="sulu.search.field" type="string"/>
                </property>
                <property name="downloads" type="media_selection">
                    <meta>
                        <title lang="de">Downloads</title>
                        <title lang="en">Downloads</title>
                    </meta>

                </property>
            </properties>
        </section>

        <section name="form">
            <meta>
                <title lang="de">Formular</title>
                <title lang="en">Form</title>

                <info_text lang="de">Bereich für Formular</info_text>
                <info_text lang="en">Area for Form</info_text>
            </meta>
            <properties>
                <property name="showSeminarForm" type="checkbox" colspan="6">
                    <meta>
                        <title lang="de">Buchung Seminar anzeigen</title>
                        <title lang="en">Show Seminarform</title>
                    </meta>
                </property>
                <property name="showRoomForm" type="checkbox" colspan="6">
                    <meta>
                        <title lang="de">Buchung Räumlichkeiten anzeigen</title>
                        <title lang="en">Show Roombooking form</title>
                    </meta>
                </property>
                <property name="maxPeople" type="text_line" colspan="12">
                    <meta>
                        <title lang="de">Maximalanzahl Teilnehmer</title>
                        <title lang="en">Maximum members</title>
                    </meta>
                </property>
                <property name="success" type="text_editor">
                    <meta>
                        <title lang="de">Bestätigungstext Website</title>
                        <title lang="en">Confirmation text website</title>
                    </meta>

                    <params>
                        <param name="link" value="true"/>
                        <param name="table" value="true"/>
                        <param name="extra_allowed_content" value="img(*)[*]; span(*)[*]; div(*)[*]; iframe(*)[*]; script(*)[*]" />
                        <param name="height" value="100"/>
                        <param name="max_height" value="500"/>
                        <param name="paste_from_word" value="true"/>
                        <param name="remove_buttons" value="Format" />
                    </params>
                </property>
                <property name="subject" type="text_line">
                    <meta>
                        <title lang="de">Bestätigungsmail Betreff</title>
                        <title lang="en">Confirmationmail Subject</title>
                    </meta>
                </property>
                <property name="successmail" type="text_editor">
                    <meta>
                        <title lang="de">Bestätigungsmail Text</title>
                        <title lang="en">Confirmationmail text</title>
                    </meta>

                    <params>
                        <param name="link" value="true"/>
                        <param name="table" value="true"/>
                        <param name="extra_allowed_content" value="img(*)[*]; span(*)[*]; div(*)[*]; iframe(*)[*]; script(*)[*]" />
                        <param name="height" value="100"/>
                        <param name="max_height" value="500"/>
                        <param name="paste_from_word" value="true"/>
                        <param name="remove_buttons" value="Format" />
                    </params>
                </property>
                <property name="recipientEmail" type="email" colspan="6">
                    <meta>
                        <title lang="de">E-Mail Adresse Empfänger</title>
                        <title lang="en">E-Mail address recipient</title>
                    </meta>
                </property>
                <property name="recipientName" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Name Empfänger</title>
                        <title lang="en">Name recipient</title>
                    </meta>
                </property>
                <property name="senderEmail" type="email" colspan="6">
                    <meta>
                        <title lang="de">E-Mail Adresse Absender</title>
                        <title lang="en">E-Mail address sender</title>
                    </meta>
                </property>
                <property name="senderName" type="text_line" colspan="6">
                    <meta>
                        <title lang="de">Name Absender</title>
                        <title lang="en">Name sender</title>
                    </meta>
                </property>
                <property name="topics" type="text_area" colspan="12">
                    <meta>
                        <title lang="de">Themen/Anlass Optionen</title>
                        <title lang="en">Topics options</title>
                    </meta>
                </property>
            </properties>
        </section>

    </properties>
</template>


Greetings Raphael Hofer

RaphaelHofer avatar Aug 06 '15 13:08 RaphaelHofer

@wachterjohannes can you verify? thx

chirimoya avatar Mar 10 '16 17:03 chirimoya