Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
moqui
/
moqui-mjml
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
6843e522
authored
2025-01-30 20:49:20 -0700
by
acetousk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Keep variables in the html on save
1 parent
f0694f89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
service/mjml/MjmlServices.xml
service/mjml/MjmlServices.xml
View file @
6843e52
...
...
@@ -287,7 +287,15 @@ along with this software (see the LICENSE.md file). If not, see
<if
condition=
"!htmlFile || htmlFile.parent?.location != grapesJsResource.location"
>
<return
error=
"true"
message=
"Resource not found"
/>
</if>
<script>
<![CDATA[htmlFile.putText(html)]]>
</script>
<set
field=
"htmlOut"
from=
"null"
/>
<script>
<![CDATA[
if (context.replaceMoquiVarRegexPattern) {
context.htmlOut = html.replaceAll(context.replaceMoquiVarRegexPattern) { match ->
def output = moquiVars.find { it.value == match }?.key
return '${' + output + '}'
}
}
htmlFile.putText(htmlOut)]]>
</script>
<set
field=
"htmlVersionName"
from=
"htmlFile?.getCurrentVersion()?.getVersionName()"
/>
<if
condition=
"publish"
>
<service-call
name=
"update#moqui.basic.email.EmailTemplate"
in-map=
"[emailTemplateId:emailTemplateId,
...
...
Please
register
or
sign in
to post a comment