Opened 8 years ago

Closed 8 years ago

#4473 closed Bug (fixed)

editor.dataProcessor.dataFilter.addRules() doesnt work for same multiple elements

Reported by: dmitryx Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: Core : Output Data Version: 3.0
Keywords: Confirmed Review+ Cc:


I tried to create custom plugin, that deals with div fake object, so i added some code to parse blocks presented as fake object correctly:

afterInit : function( editor )
			var dataProcessor = editor.dataProcessor,
				dataFilter = dataProcessor && dataProcessor.dataFilter;
			if ( dataFilter )
					elements :
						div : function( element )
							return editor.createFakeParserElement( element, 'cke_myclass', 'div', false );

		requires : [ 'fakeobjects' ]

The problem about it, is that exception of undefined variable is thrown when editor loads. Apparently, it only happens if pagebreak plugin is active (so another rule for DIV element is registered). But if you disable pagebreak plugin: config.removePlugins = 'pagebreak', it works just fine.

Attachments (1)

4473.patch (466 bytes) - added by garry.yao 8 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by garry.yao

  • Component changed from General to Core : Output Data
  • Keywords Confirmed added
  • Milestone changed from CKEditor 3.x to CKEditor 3.1
  • Owner set to garry.yao
  • Status changed from new to assigned

Nice catch though the fix has been proposed at multiple other tickets, desire to give a separate fix on this ticket.

Changed 8 years ago by garry.yao

comment:2 Changed 8 years ago by garry.yao

  • Keywords Review? added

comment:3 Changed 8 years ago by garry.yao

Related to #4067, #4548, #3401.

comment:4 Changed 8 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:5 Changed 8 years ago by garry.yao

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

Fixed with [4491].

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