Automating the Keyboard Maestro Forum Editor

I figured it out.

You have to replace actual linefeeds with \\n in the AppleScript.