Opened 14 years ago

Closed 14 years ago

#4473 closed Bug (fixed)

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

Reported by: Dmiry Polyakov 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 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 14 years ago by Garry Yao

Component: GeneralCore : Output Data
Keywords: Confirmed added
Milestone: CKEditor 3.xCKEditor 3.1
Owner: set to Garry Yao
Status: newassigned

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

Changed 14 years ago by Garry Yao

Attachment: 4473.patch added

comment:2 Changed 14 years ago by Garry Yao

Keywords: Review? added

comment:3 Changed 14 years ago by Garry Yao

Related to #4067, #4548, #3401.

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:5 Changed 14 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [4491].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy