#9994 closed New Feature (fixed)
Mark which allowed content rules were added by which features
| Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.1 RC |
| Component: | General | Version: | |
| Keywords: | Drupal | Cc: | wim.leers@… |
Description (last modified by )
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 (10)
comment:1 Changed 13 years ago by
| Status: | new → confirmed |
|---|
comment:2 Changed 13 years ago by
| Summary: | Mark which allowed content rules were adde by which features → Mark which allowed content rules were added by which features |
|---|
comment:3 Changed 13 years ago by
| Description: | modified (diff) |
|---|
comment:4 Changed 13 years ago by
comment:5 Changed 13 years ago by
| Owner: | set to Piotrek Koszuliński |
|---|---|
| Status: | confirmed → assigned |
comment:6 Changed 13 years ago by
| Status: | assigned → review |
|---|
comment:8 Changed 13 years ago by
| Status: | review → review_passed |
|---|
comment:9 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Merged to major on git:85dfc91 on dev and 5263b41 on tests.
comment:10 Changed 13 years ago by
Quite elegant patch :)
Referenced at http://drupal.org/node/1894644#comment-7115604, where this feature will be put to use.

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 mapThis is not complete yet, so you'll see few rules without names (in ':(' property).