{"action":"closed","issue":{"url":"https://api.github.com/repos/EWSoftware/SHFB/issues/320","repository_url":"https://api.github.com/repos/EWSoftware/SHFB","labels_url":"https://api.github.com/repos/EWSoftware/SHFB/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/EWSoftware/SHFB/issues/320/comments","events_url":"https://api.github.com/repos/EWSoftware/SHFB/issues/320/events","html_url":"https://github.com/EWSoftware/SHFB/issues/320","id":167154979,"number":320,"title":"Custom content in OpenXml","user":{"login":"binpick","id":20605669,"avatar_url":"https://avatars.githubusercontent.com/u/20605669?v=3","gravatar_id":"","url":"https://api.github.com/users/binpick","html_url":"https://github.com/binpick","followers_url":"https://api.github.com/users/binpick/followers","following_url":"https://api.github.com/users/binpick/following{/other_user}","gists_url":"https://api.github.com/users/binpick/gists{/gist_id}","starred_url":"https://api.github.com/users/binpick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binpick/subscriptions","organizations_url":"https://api.github.com/users/binpick/orgs","repos_url":"https://api.github.com/users/binpick/repos","events_url":"https://api.github.com/users/binpick/events{/privacy}","received_events_url":"https://api.github.com/users/binpick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/EWSoftware/SHFB/labels/BuildEngine","name":"BuildEngine","color":"c7def8"},{"url":"https://api.github.com/repos/EWSoftware/SHFB/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-23T00:09:39Z","updated_at":"2016-08-20T22:04:40Z","closed_at":"2016-08-20T22:04:40Z","body":"Hi,\r\n\r\ni created a custom OpenXml presentation style where i would like to add a predefined title page. That is a snippet i am including in the /document template. Basically, the title page is included but that page/snippet contains elements with text, e.g.:\r\n\r\n```xml\r\n...\r\n<wp:positionH relativeFrom=\"page\">\r\n<wp:align>center</wp:align>\r\n</wp:positionH>\r\n<wp:positionV relativeFrom=\"page\">\r\n<wp:posOffset>3629025</wp:posOffset>\r\n</wp:positionV>\r\n...\r\n```\r\n\r\nNow the problem is that when BuildOpenXmlFile is executed, there is a method WrapStrayElementNodes that surrounds textual elements with paragraphs and ranges. The result looks as foolows and yields to an invalid OpenXml document:\r\n\r\n```xml\r\n...\r\n<wp:positionH relativeFrom=\"page\">\r\n              <wp:align>\r\n                <w:p>\r\n                  <w:r>\r\n                    <w:t xml:space=\"preserve\">center</w:t>\r\n                  </w:r>\r\n                </w:p>\r\n              </wp:align>\r\n            </wp:positionH>\r\n            <wp:positionV relativeFrom=\"page\">\r\n              <wp:posOffset>\r\n                <w:p>\r\n                  <w:r>\r\n                    <w:t xml:space=\"preserve\">3629025</w:t>\r\n                  </w:r>\r\n                </w:p>\r\n              </wp:posOffset>\r\n```\r\n\r\nIs it possible to make that WrapStrayElementNodes method optional? Or is there good way to include snippets in OpenXml format?\r\n\r\nRegards \r\n"}}
{"actor":{"display_login":"EWSoftware"}}