6843e522 by acetousk

Keep variables in the html on save

1 parent f0694f89
...@@ -287,7 +287,15 @@ along with this software (see the LICENSE.md file). If not, see ...@@ -287,7 +287,15 @@ along with this software (see the LICENSE.md file). If not, see
287 <if condition="!htmlFile || htmlFile.parent?.location != grapesJsResource.location"> 287 <if condition="!htmlFile || htmlFile.parent?.location != grapesJsResource.location">
288 <return error="true" message="Resource not found"/> 288 <return error="true" message="Resource not found"/>
289 </if> 289 </if>
290 <script><![CDATA[htmlFile.putText(html)]]></script> 290 <set field="htmlOut" from="null"/>
291 <script><![CDATA[
292 if (context.replaceMoquiVarRegexPattern) {
293 context.htmlOut = html.replaceAll(context.replaceMoquiVarRegexPattern) { match ->
294 def output = moquiVars.find { it.value == match }?.key
295 return '${' + output + '}'
296 }
297 }
298 htmlFile.putText(htmlOut)]]></script>
291 <set field="htmlVersionName" from="htmlFile?.getCurrentVersion()?.getVersionName()"/> 299 <set field="htmlVersionName" from="htmlFile?.getCurrentVersion()?.getVersionName()"/>
292 <if condition="publish"> 300 <if condition="publish">
293 <service-call name="update#moqui.basic.email.EmailTemplate" in-map="[emailTemplateId:emailTemplateId, 301 <service-call name="update#moqui.basic.email.EmailTemplate" in-map="[emailTemplateId:emailTemplateId,
......