Hello,
I was getting a setOutputFormatting error for a CKEditor field that had Content Type set to "Markup/HTML with image management" while trying to save HTML to that field in the course of importing about 150 pages through the API.
This happened although $p->of(false) was set.
It took me quite a while to figure out that this error was thrown only when there were image tags in the HTML that should be saved to that field.
Then I went and switched Content Type for that field to "Unknown". Now the import worked fine.
After switching Content Type back to "Markup/HTML with image management" and running the import again, there were no errors anymore.
I just thought I'd mention this here in case someone else is facing similar problems.
This happened on a 2.6.15 dev install.