Opened 15 years ago
Closed 15 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: |
Description
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 ) { dataFilter.addRules( { 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)
Change History (6)
comment:1 Changed 15 years ago by
Component: | General → Core : Output Data |
---|---|
Keywords: | Confirmed added |
Milestone: | CKEditor 3.x → CKEditor 3.1 |
Owner: | set to Garry Yao |
Status: | new → assigned |
Changed 15 years ago by
Attachment: | 4473.patch added |
---|
comment:2 Changed 15 years ago by
Keywords: | Review? added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Nice catch though the fix has been proposed at multiple other tickets, desire to give a separate fix on this ticket.