Project

General

Profile

Actions

Feature #34031

closed

Allow setting allowedItems through TypoScript

Added by Stefan Neufeind about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2012-02-17
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

allowedItems can currently only be modified through a hook and defaults to the hardcoded "magic,plain,image". But it would easily be possible to override this through TypoScript if that setting is set and still keep the full functionality with hooks, removeItems etc.

Thanks go to Bernd Wilke for the idea.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #34027: Ordering for menutabs at "Insert image"Closed2012-02-17

Actions
Related to TYPO3 Core - Feature #34028: Default active tab to first in allowedItems-list at "Insert image"Closed2012-02-17

Actions
Actions #1

Updated by Gerrit Code Review about 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9069

Actions #2

Updated by Stefan Neufeind about 12 years ago

Together with changes from #34027 and #34028 this will for example easily allow to set a list of "plain,magic,image" and by that move the "plain image" tab to the front.

Actions #3

Updated by Georg Ringer about 12 years ago

i guess you mean tsconfig, right?

Actions #4

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9069

Actions #5

Updated by Stefan Neufeind about 12 years ago

Yep, sure tsconfig.

Actions #6

Updated by Philipp Gampe about 12 years ago

You you post some test tsconfig?

Actions #7

Updated by Stanislas Rolland about 12 years ago

Any item may be removed in the RTE Page TSConfig with
buttons.image.options.removeItems = some-list-of-item-keys

Do you mean that you want to add a new property to allow to configure the order of the tabs? like
buttons.image.options.orderItems ?

If not, how do you suggest to configure the order of items?

Please do not change the current default order on all users of all installations just because you want to use a different order.

Also, keep in mind that the configuration of items (allowed and/or ordered) must apply as well to items added by hooks.

Actions #8

Updated by Stefan Neufeind about 12 years ago

I don't indend to remove them (removeItems) but reorder them. I wasn't aware that orderItems is used in rtehtmlarea already - but that's only for buttons.formattext.orderItems and buttons.formatblock.orderItems. And in the docs of those (http://typo3.org/documentation/document-library/extension-manuals/rtehtmlarea_manual/1.7.4/view/4/4/) it is written that if no ordering is set they appear in alphabetic order - well, that's not the case with tabs (which have a "random" natural order).

The idea was to allow moving items by reordering them in allowedItems. The current positioning is the one already present/default in allowedItems so that doesn't change anything in output for the default-case.

Currently the patch adds for allowedItems to be modified by tsconfig and for sure hooks can still change the contents of this array in any way they want to.

So if I understand you right: Do you suggest that not allowedItems is used for what the patch proposes but an "orderItems"-option is added? And if no "orderItems" is set what order is used then?

I'll be happy to rework the patch as you suggest.

Actions #9

Updated by Stanislas Rolland about 12 years ago

I think 'allowedItems' is redundant/competing with 'removeItems'.

Please use 'orderItems'.

Apply the order after the allowed items have been determined:
allowed items = base items + hook additions/removals - browser restrictions - 'removeItems'

so that all items may be ordered in Page TSConfig, including those added by hooks.

If 'orderItems' is specified, any item in the list must be valid: remove from the list any item not allowed.

Finally, if 'orderItems' is specified, any item not in the list is not allowed.

The default order is the order we have today, possibly modified by hooks.

Actions #10

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9069

Actions #11

Updated by Stefan Neufeind about 12 years ago

please close. this was merged.
Functionally reachable via "buttons.image.options.orderItems" in PageTS, not allowedItems as I originally suggested

Actions #12

Updated by Stanislas Rolland about 12 years ago

  • Status changed from Under Review to Closed
Actions

Also available in: Atom PDF