By the way, it also works correctly if I put in 'normal' html tags, like <b>, or </table>, and so on, but it always strips <link and <script> tags, even though the enablestripscript is set to false. I am also creating this to work with external .js files, so that they can be included on a page (or even better, in a template).
I have also tried to PasteHTML method directly, as well as teh editor.ExecCommand(PasteHTML), but with identical results.