Opened 15 years ago

Closed 15 years ago

#3235 closed New Feature (fixed)

V3 : ToolbarSet feature

Reported by: Frederico Caldeira Knabben Owned by: Artur Formella
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description

Currently, CKEditor offers a way to provide the toolbar definition by setting it directly to the "toolbar" setting.

While that is useful, it would be still nice to have more than one toolbar definitions in the configuration file, making it possible switching them with a simple setting, just like V2.

The idea would be introducing the "toolbarSets" object setting, which accepts several definitions, and then make the "toolbar" setting smart. If it receives a string, its the toolbarSet name, otherwise it's a toolbar definition.

Attachments (3)

3235.patch (3.3 KB) - added by Artur Formella 15 years ago.
3259.patch (2.2 KB) - added by Artur Formella 15 years ago.
3235_2.patch (2.3 KB) - added by Artur Formella 15 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 15 years ago by Artur Formella

Owner: set to Artur Formella
Status: newassigned

Changed 15 years ago by Artur Formella

Attachment: 3235.patch added

comment:2 Changed 15 years ago by Artur Formella

Keywords: Review? added

comment:3 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

There is a simpler solution, which would also bring the possibility of having different toolbarsets sharing the same name in different instances (I know, a rare situation, but people is quite creative out there, so why not?).

Instead of creating a specific object to define toolbarsets, let's leave it all inside the config object as independent properties, to be sure we'll not having one instance mixing things with others. For example:

CKEDITOR.config.toolbar = 'Full';  // May be the toolbar definition.

CKEDITOR.config.toolbar_Full  = [ ... ];
CKEDITOR.config.toolbar_Basic = [ ... ];

So, when loading the toolbar, we simply take editor[ 'toolbar_' + editor.config.toolbar ].

Btw, let's take the opportunity to rename the "Default" toobarset to "Full". We'll have more on this later.

Also, do not change the editor.config.toolbar property to the relative toolbarset on init. Just put it in a local variable when needed. Who knows how the config properties can be used elsewhere.

KISS!

Changed 15 years ago by Artur Formella

Attachment: 3259.patch added

Changed 15 years ago by Artur Formella

Attachment: 3235_2.patch added

comment:4 Changed 15 years ago by Artur Formella

Keywords: Review? added; Review- removed

I added the wrong patch by mistake. Correct patch is 3235_2.patch

comment:5 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:6 Changed 15 years ago by Artur Formella

Resolution: fixed
Status: assignedclosed

Fixed with [3328]

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy