insertFragment in AuthorMode is pretty
Posted: Fri Sep 23, 2016 9:43 pm
Hi
I have a plugin which constructs a string containing XML with everything on one line. I insert it into a document using the following method:
AuthorDocumentFragment fragment = documentController.createNewDocumentFragmentInContext( xmlString, selection);
documentController.insertFragment(selection, fragment);
In Author mode everything looks fine but when I switch to text mode the inserted fragment is pretty printed while the rest of the document is not. I would like the fragment to appear in the document the way I created it in the string - all on the same line.
Any ideas?
Thanks
Andy
I have a plugin which constructs a string containing XML with everything on one line. I insert it into a document using the following method:
AuthorDocumentFragment fragment = documentController.createNewDocumentFragmentInContext( xmlString, selection);
documentController.insertFragment(selection, fragment);
In Author mode everything looks fine but when I switch to text mode the inserted fragment is pretty printed while the rest of the document is not. I would like the fragment to appear in the document the way I created it in the string - all on the same line.
Any ideas?
Thanks
Andy