Here you go. This code will contain your paragraphs with subsequent identifiers, and will also add a custom class to each paragraph that has not yet been assigned.
var idCounter = 0, pClass = 'myCustomClass', pClassRegexp = new RegExp( pClass, 'g' ); CKEDITOR.replace( 'editor1', { on: { instanceReady: function() { this.dataProcessor.htmlFilter.addRules({ elements: { p: function( element ) {
oleq source share