Opened 7 years ago

Closed 7 years ago

#9430 closed Bug (invalid)

In 4.0 beta dataProcessor.writer.setRules is undefined

Reported by: ctrl Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

There is an issue with 4.0 beta version.

The code below worked fine in 3.x

Now dataProcessor.writer.setRules is undefined:

CKEDITOR.plugins.add(

'test', {

requires: htmlwriter?,

init: function(editor) {

editor.dataProcessor = new CKEDITOR.htmlDataProcessor(editor);

editor.dataProcessor.writer.setRules(

'p', {

breakBeforeClose: false

}

);

editor.fire('customDataProcessorLoaded');

}

}

);

Change History (1)

comment:1 Changed 7 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

I have checked this code and it works on latest 'master' version. Perhaps you have been calling it too early if it was used directly on HTML page.

editor.on( 'instanceReady', function( e ) {	
CKEDITOR.plugins.add(
				'test', {
					requires: 'htmlwriter',
					init: function(editor) {
						editor.dataProcessor = new CKEDITOR.htmlDataProcessor(editor);
						editor.dataProcessor.writer.setRules(
							'p', {
								breakBeforeClose: false
							}
						);
						editor.fire('customDataProcessorLoaded');
						}
					}
				);
});
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy