Ticket #9994 (closed New Feature: fixed)

Opened 21 months ago

Last modified 20 months ago

Mark which allowed content rules were added by which features

Reported by: Reinmar Owned by: Reinmar
Priority: Normal Milestone: CKEditor 4.1 RC
Component: General Version:
Keywords: Drupal Cc: wim.leers@…

Description (last modified by j.swiderski) (diff)

This isssue is extraced from #9829.

Make it possible to create feature => allowed content object.

Since Drupal will have something like drag&drop toolbar builder it will need to know which button adds which "allowed content"

Change History

comment:1 Changed 21 months ago by Reinmar

  • Status changed from new to confirmed

comment:2 Changed 21 months ago by Reinmar

  • Summary changed from Mark which allowed content rules were adde by which features to Mark which allowed content rules were added by which features

comment:3 Changed 21 months ago by j.swiderski

  • Description modified (diff)

comment:4 Changed 21 months ago by Reinmar

I pushed quick preview of how this issue should be solved to t/9994.

With this code it is possible to create a feature => contentn map.

var rules = CKEDITOR.instances.editor1.filter.allowedContent,
	rule, name
	obj = {};

for ( var i = rules.length; i > 0; ) {
	rule = rules[ --i ];
	name = rule.featureName || ':(';
	if ( !obj[ name ] )
		obj[ name ] = [];
	obj[ name ].push( rule );
}

// obj contains feature => content map

This is not complete yet, so you'll see few rules without names (in ':(' property).

comment:5 Changed 21 months ago by Reinmar

  • Owner set to Reinmar
  • Status changed from confirmed to assigned

comment:6 Changed 21 months ago by Reinmar

  • Status changed from assigned to review

Pushed t/9994 to dev and tests (both based on t/9829).

Last edited 21 months ago by Reinmar (previous) (diff)

comment:7 Changed 21 months ago by Reinmar

Rebased branched on major.

comment:8 Changed 21 months ago by fredck

  • Status changed from review to review_passed

comment:9 Changed 21 months ago by Reinmar

  • Status changed from review_passed to closed
  • Resolution set to fixed

Merged to major on git:85dfc91 on dev and 5263b41 on tests.

comment:10 Changed 20 months ago by Wim Leers

Quite elegant patch :)

Referenced at http://drupal.org/node/1894644#comment-7115604, where this feature will be put to use.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy