The page you linked to explains in "Setting Writer Rules"
If that explanation doesn't make sense, read up on ckeditor's event system. You wait until the instanceReady event fires so all the default rules are in place, then modify them to suit your liking.
Re: Where to config output format?
If that explanation doesn't make sense, read up on ckeditor's event system. You wait until the instanceReady event fires so all the default rules are in place, then modify them to suit your liking.