#3841: Filter independent of writer
--------------------------------+-------------------------------------------
 Reporter:  garry.yao           |       Owner:              
     Type:  Task                |      Status:  new         
 Priority:  Normal              |   Milestone:  CKEditor 3.x
Component:  Core : Output Data  |     Version:              
 Keywords:  Discussion          |  
--------------------------------+-------------------------------------------
 ===The Problem===
 The current filter system doesn't respect filter rule
 '''priority''':[[BR]]
   When rule A is specified with priority higher than rule B when adding to
 filter system, what expected is all rules items of A will be applied
 before rules from B.[[BR]]
 Unfortunatelly, the current system doesn't allow this happen: the current
 behavior is different, in which it only guarantee the priority of the same
 rule item, so one rule imposed on the parent node could never come later
 than it's child's rule.[[BR]]
 If now we have
  * a rule entry in A, said, e.g. remove all empty <p>;
  * a rule entry in B, said, e.g. remove empty <a>;
 Then there's no way to guarantee both rule's completeness.[[BR]]

 === The Solution ===
 The reason is due to html filter is tightly binding to writer now, which
 does not allow it to run rules in multiple times, the rules is applied
 along with the writing process.[[BR]]
 If we isolate the filter system out, it becomes more flexible:
 1. Allow "parsing once, filtering at will", with each filter rule changing
 the lightweight dom tree structure on the fly;
 2. Allow filter to alter node type easily;
 3. Write the whole document after all filters has applied.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/3841>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
_______________________________________________
FCKeditor-Trac mailing list
FCKeditor-Trac@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to