.
				options.on( eventName, inputListener );
			} );
		} );

		// We need to recreate editor, because filter is caching checks.
		editor.destroy( true );
	}

	function addRemoveRule( rule, state, arr ) {
		var index = CKEDITOR.tools.array.indexOf( arr, rule );

		if ( state && index === -1 ) {
			arr.push( rule );
		} else if ( !state && index >= 0 ) {
			arr.splice( index, 1 );
		}
	}
</script>
