Ticket #9994 (closed New Feature: fixed)
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@… |
Change History
comment:2 Changed 5 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:4 Changed 5 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 5 months ago by Reinmar
- Status changed from confirmed to assigned
- Owner set to Reinmar
comment:9 Changed 4 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 4 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.
