{"action":"created","issue":{"url":"https://api.github.com/repos/PHPOffice/PHPWord/issues/683","labels_url":"https://api.github.com/repos/PHPOffice/PHPWord/issues/683/labels{/name}","comments_url":"https://api.github.com/repos/PHPOffice/PHPWord/issues/683/comments","events_url":"https://api.github.com/repos/PHPOffice/PHPWord/issues/683/events","html_url":"https://github.com/PHPOffice/PHPWord/issues/683","id":121577020,"number":683,"title":"replaceblock in template does not work","user":{"login":"germanrp1","id":16246506,"avatar_url":"https://avatars.githubusercontent.com/u/16246506?v=3","gravatar_id":"","url":"https://api.github.com/users/germanrp1","html_url":"https://github.com/germanrp1","followers_url":"https://api.github.com/users/germanrp1/followers","following_url":"https://api.github.com/users/germanrp1/following{/other_user}","gists_url":"https://api.github.com/users/germanrp1/gists{/gist_id}","starred_url":"https://api.github.com/users/germanrp1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/germanrp1/subscriptions","organizations_url":"https://api.github.com/users/germanrp1/orgs","repos_url":"https://api.github.com/users/germanrp1/repos","events_url":"https://api.github.com/users/germanrp1/events{/privacy}","received_events_url":"https://api.github.com/users/germanrp1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-10T21:04:36Z","updated_at":"2015-12-26T15:37:43Z","closed_at":null,"body":"Hello.\r\nI´m trying to use a template to generate a word document.\r\nI can set the variables with setValue, and it works fine\r\nBut I can't use this method to set the value for a rich text format (because I have read that it only works with single end lines not mith multi-lines texts)\r\nI need to put one multiline text in a specified position, so I am trying to replace ablock called ${LONGTEXT} ${/LONGTEXT} with my multiline RTF Text.\r\n\r\nBut the problem is that it doesn´t work.\r\n\r\nI use replaceblock but it erase the block: ${LONGTEXT} ${/LONGTEXT}, but it leaves it blank, it doesn't replace it with my longtext.\r\n\r\nI have put some comments inside the \"TemplaeProccesor.php\" and I see that inside this module, the text has been replaced (I can see it if a echo this->tempDocumentMainPart), but when it returns to main module, the block has been erased instead of replaced in the document.\r\n\r\nWhat am I doing wrong?\r\n\r\nHelp needed please.\r\n\r\nI can write the part of the code involved:\r\n\r\n\r\n$document = new \\PhpOffice\\PhpWord\\TemplateProcessor('plantilla.docx');\r\n...\r\n$document->setValue('var1', $var1);\r\n$document->setValue('var4', $var4);\r\n$document->setValue('var5', $var5);\r\n$document->setValue('var2', $var2);\r\n\r\n$textReplazingTheOldOne = \"......(The multilne Text or Anything)...\";\r\n\r\n$document->replaceBlock('LONGTEXT', $textReplazingTheOldOne);\r\n// If we go into TemplateProccesor Module, we can see that the block has been replaced in the document\r\n....\r\n//But when we return to this point, the LONGTEXT block has been erased instead of replaced.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PHPOffice/PHPWord/issues/comments/167336487","html_url":"https://github.com/PHPOffice/PHPWord/issues/683#issuecomment-167336487","issue_url":"https://api.github.com/repos/PHPOffice/PHPWord/issues/683","id":167336487,"user":{"login":"weige215","id":3599287,"avatar_url":"https://avatars.githubusercontent.com/u/3599287?v=3","gravatar_id":"","url":"https://api.github.com/users/weige215","html_url":"https://github.com/weige215","followers_url":"https://api.github.com/users/weige215/followers","following_url":"https://api.github.com/users/weige215/following{/other_user}","gists_url":"https://api.github.com/users/weige215/gists{/gist_id}","starred_url":"https://api.github.com/users/weige215/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weige215/subscriptions","organizations_url":"https://api.github.com/users/weige215/orgs","repos_url":"https://api.github.com/users/weige215/repos","events_url":"https://api.github.com/users/weige215/events{/privacy}","received_events_url":"https://api.github.com/users/weige215/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T15:37:42Z","updated_at":"2015-12-26T15:37:42Z","body":"\"<w:p> </w:p>\", not “/w:p”"}}